Hi All,
I am using the following code to display items in the combobox. but item is not getting displayed.
Code:
<ComboBox Width="100" ItemsSource="{Binding}" SelectedIndex="0" Name="cbProduct"/>
List<ComboObject> combObjList = new List<ComboObject>();
combObjList.Add(new ComboObject { Text = "All", Value = "%" });
combObjList.Add(new ComboObject { Text = "Music", Value = "1" });
combObjList.Add(new ComboObject { Text = "Games", Value = "2" });
combObjList.Add(new ComboObject { Text = "Video", Value = "3" });
cbProduct.DataContext= combObjList;
cbProduct.DisplayMemberPath = "Text";
cbProduct.SelectedValuePath = "Value";