XAML ComboBox Bind to Property
Posted
by griegs
on Stack Overflow
See other posts from Stack Overflow
or by griegs
Published on 2010-05-03T03:31:47Z
Indexed on
2010/05/03
4:48 UTC
Read the original article
Hit count: 369
If I have a property in my C#;
public CollectionView Months
{
get
{
CollectionView retList = new Enumerations.Months().ToCollectionView<Enumerations.Months>();
return retList;
}
}
And I have a ComboBox;
<ComboBox x:Name="ddlMonth" Grid.Row="3" Grid.Column="1"
ItemsSource="{Binding Source={StaticResource Months}}"/>
How can I bind my ComboBox to my property?
I should add I'm a complete xaml newbie.
© Stack Overflow or respective owner