WPF Controls with MVVM: ItemsControl

IAmTimCorey
IAmTimCorey
83.7 هزار بار بازدید - 6 سال پیش - How do you put a
How do you put a list of objects on a WPF form dynamically so that if you add or remove an entry, the controls for it are added or removed? In this installment of the WPF Controls mini-series, we are going to look at one possible solution, which is to use the ItemsControl. This is one of those controls that is actually rather easy to use but is, at the same time, also confusing to a lot of people. Let's clear up that confusion.

Full courses: https://www.iamtimcorey.com/
Source Code: https://leadmagnets.app/?Resource=WPF...
Patreon: Patreon: IAmTimCorey
Newsletter signup:  https://signup.iamtimcorey.com/

0:00 - Intro
1:42 - Demo app overview
3:25 - Creating ItemsControl
5:40 - Displaying data: ItemsTemplate
11:52 - Note on data layout
13:41 - Changing layout: ItemsPanelTemplate
17:12 - Changing data set: add and remove buttons
27:42 - Bugs to expect when changing data
30:12 - Summary and concluding remarks

Thanks to Ralfs HBK for the chapter breakdown
6 سال پیش در تاریخ 1397/07/02 منتشر شده است.
83,778 بـار بازدید شده
... بیشتر