I have a wpf user control which exposes an IEnumerable ItemsSource DependencyProperty. I bind this property to a ListBox control in my UserControl.
I would like to know how I can make my user control work when a CompositeCollection is given. Currently I'm utilising my control like this:
<my:uc>
<my:uc.ItemsSource>
<CompositeCollection>
<CollectionContainer Collection="{My Binding}"></CollectionContainer>
<CollectionContainer Collection="{My Binding}"></CollectionContainer>
</CompositeCollection>
</my:uc.ItemsSource>
</my:uc>
I would like this to display the contents of these CollectionContainers in the list box, but at the moment its not enumerating through the containers. The only items my listbox shows is two "System.Data.CollectionContainer" items.
[b]Edit:[/b] The XAML designer informs me that "Property 'ItemsSource' does not support values of type 'CompositeCollection'." I think this is my problem.. but how do I make it "support" CompositeCollection?