I want to create a ListBox
and fill it with anonymous UIElement
. In other words, the DataTemplate
of the ItemTemplate
will contain only one element, and afterwords during the runtime, afterwards I will create in the code behind different UIElement
s (TextBlock
s, Grid
s ...) and populate the list with it.
So how am I going to write the DataTemplate
of the ListBox
? And how am I intend to use an ObservableCollection
for the ItemSource
? So should use an ObsevableCollection
of UIElement
?