<CombobBox x:Name="cbo"
Style="{StaticResource ComboStyle1}"
DisplayMemberPath="NAME"
SelectedItem="{Binding Path=NAME}"
SelectedIndex="1">
<ComboBox.ItemTemplate>
<DataTemplate>
<Grid>
<TextBlock Text="{Binding Path=NAME}"/>
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
In the Window
OnLoaded
event, I wrote the code to set the ItemsSource
:
cbo.ItemsSource = ser.GetCity().DefaultView;
While loading the window I can see that the initially the the first item is loading but at the same time it clears the displayed item. I am stuck in this scenario and any help is appreciated.
Regards
Kishore