I have a ComboBox
that is data bound where I cannot insert sentinel items. I would like to show a default string if there is no selected value in the ComboBox.
I already tried using a style for this:
<ComboBox.Style>
<Style TargetType="ComboBox">
<Style.Triggers>
<DataTrigger Binding="{Binding RelativeSource={RelativeSource Self}, Path=SelectedIndex}" Value="-1">
<Setter Property="Text" Value="(unconstrained)" />
</DataTrigger>
</Style.Triggers>
</Style>
</ComboBox.Style>
but this completely broke data binding (no values were selectable).