Create new User Control
Create code DataTemplate for User Control
- Also outside of the context we use the Datatype as MainWindowViewModel so we can use the Foo object itself as Binding
- In DataTemplate use datatype is : FooViewModel, is also the Foo object above
We can use properties in FooViewModel to bind data: ID, Name
Class FooViewModel
MainWindowViewModel class, create Foo Object




إرسال تعليق