i have created an item template for wpf combo box to display multiple properties of and object in a combo box item.
<ComboBox x:Name="cmbType" Grid.Column="2" Grid.Row="0" Grid.ColumnSpan="1"
SelectedItem="{Binding Current.Type, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" IsEditable="False"
ItemsSource="{Binding Types, Mode=OneWay}" DropDownClosed="cmbIncidentType_DropDownClosed" TabIndex="601">
<ComboBox.ItemTemplate>
<DataTemplate>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="10" />
<ColumnDefinition Width="4" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="{Binding ID}" />
<TextBlock Grid.Column="2" Text="{Binding Name}" />
</Grid>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
till now its perfect it shows both id and name of a type in combo box item but now i want when i select an item it should only display name of selected item in the text area of combo box instead of displaying both ID and name.
Can anyone please help?