WPF Data Binding on behalf of ItemsControl provides an elegant solution for collection of data types. All you have to do is simple as:
<ListBox ItemsSource="{Binding Path=Items}" ... />
But what if you want to bind the same collection to a Panel, let say UniformGrid, WrapPanel or other custom panel?
Trying to bind the Panel.Children collection using the same technique above, results in a big ERROR!
And the reason is: Panel.Children is not designed to be bind, hence Children is a read-only, non-dependency property.
So what can you do?
Instead of trying to bind the panel, stick to the ItemsControl solution, and change its ItemsPanel to whatever you like to:
<ListBox ItemsSource="{Binding Path=Items}">
<ListBox.ItemsPanel>
<ItemsPanelTemplate>
<UniformGrid />
</ItemsPanelTemplate>
</ListBox.ItemsPanel>
</ListBox>
Now, if you want to visualize these items, use a cool Data Template and a Cool custom Panel:
<ListBox.ItemTemplate>
<DataTemplate>
<StackPanel>
<Image Source="{Binding Image}" ... />
<TextBlock Text="{Binding Name}" ... />
</StackPanel>
</DataTemplate>
</ListBox.ItemTemplate>
You can download the code from here.