I want to display the ComboBox as a TextBox (without frame, background, toggle button, ect.) - only the current selected text of the element. I like it, but I donβt understand how to link the 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>
source share