|
|
|
|
|
by tigershark
3220 days ago
|
|
I asked you to please don't speak about things that you don't know.
The page that you linked has nothing to do with presenting multiple items with different types.
It is defining the visualisation of the control itself, defining the arrangement method for the contained items, defining the same visualisation for each item and finally it defines the container visualisation for each item.
To replicate the JSX logic in the example discussed the code that I posted is all you need.
It will bind the source of the ItemsControl to a list in the ViewModel that contains the different ViewModels that you need to display.
WPF automatically will find the DataTemplates defined for those ViewModels and use that in the visualisation.
No if, no switch, no map and nothing at all in the XAML file.
Just: <ItemsControl ItemsSource={Binding ListOfThings} /> |
|
If you are looking for exactly this feature you might be disappointed.