I bind to a ItemsControl in my codebehind:
ColumnVisibilityItems.DataContext = gc.ColumnVisibility;
where ColumnVisibility is a ObservableCollection, also tried it with dictionary..
my markup
<ItemsControl x:Name="ColumnVisibilityItems">
<Label Content="{Binding Path=Name}" />
</ItemsControl>
while stepping through, i see the collection bound having 11 items. but ItemsControl renders only the first item in collection.
Is ItemsSource property necessary to be set for this to work? because whenever i try to set that in code behind, i get the exception saying items cannot be modified because they exist already.