<ComboBox Name="cmb" Margin="5" Height="23" Canvas.Left="98" Canvas.Top="251" Width="163" SelectionChanged="cmb_SelectionChanged"> <ComboBox.ItemTemplate> <DataTemplate> <StackPanel Orientation="Horizontal"> <CheckBox Margin="5" IsChecked="{Binding IsVisited}" Checked="CheckBox_Checked"/> <TextBlock Margin="5" Text="{Binding CityName}"/> </StackPanel> </DataTemplate> </ComboBox.ItemTemplate> </ComboBox>
cmbfilter is the combobox name, just typecast it... string cmbvalue=""; System.Windows.Controls.ComboBoxItem curItem=((System.Windows.Controls.ComboBoxItem)Cmbfilter.SelectedItem); cmbvalue=curItem.Content;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)