I try to bind XAML ListBoxItem
using Code but doesn't seem work
In my XAML:
<Window.Resources> <local:FooList x:Key="FooListItem" /> </Window.Resources>
< ListBox x:Name="ListBox1" ItemsSource="{Binding Source={StaticResource FooListItem}}" />
In my code:
public class FooList { add some items; // I tried variation of that but didn't get it to work }
Any tips?