I have the following ComboBox
in my project, but one thing is bothering me very much, if I write it like this:
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="170" />
<ColumnDefinition Width="*" />
</Grid.ColumnDefinitions>
<Label Content="Candidate" Margin="3" Foreground="White" Grid.Column="0"/>
<ComboBox ItemsSource="{Binding CandidateList, UpdateSourceTrigger=PropertyChanged}"
SelectedItem="{Binding Candidate, UpdateSourceTrigger=PropertyChanged}"
IsEditable="True" Margin="3" Grid.Column="1">
<ComboBox.ItemTemplate>
<DataTemplate>
<TextBlock>
<TextBlock.Text>
<MultiBinding StringFormat="{}{0} {1}">
<Binding Path="FirstName"/>
<Binding Path="SecondName"/>
</MultiBinding>
</TextBlock.Text>
</TextBlock>
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</Grid>
So the names in the unfolded version get formatted right, but in the ComboBox
itself it displays it not right ...
Is there any possibility to make this work in xaml ?