I want to display a ComboBox as TextBox (without border, background, toggle button, ect.) – only current selected item text.
I do like this, but I can not understand how to link TextBlock, so that it displays the currently selected item in the ComboBox.
<ComboBox ItemsSource="{Binding Path=...}" SelectedValue="{Binding Path=...}" DisplayMemberPath="Name" SelectedValuePath="Id">
<ComboBox.Template>
<ControlTemplate>
<TextBlock Text="{Binding ?}"></TextBlock>
</ControlTemplate>
</ComboBox.Template>
</ComboBox>
1 Answer