I want to set a label (or textbox) default string as long as the binding value is null. This works fine for any other property than content, for example:
<Label Content="{Binding Source={StaticResource pumpCurvesViewSource}, Path=/Label}">
<Label.ContentStringFormat>Details for pump curve: {0}</Label.ContentStringFormat>
<Label.Style>
<Style TargetType="Label" BasedOn="{StaticResource header}">
<Style.Triggers>
<DataTrigger Binding="{Binding Source={StaticResource pumpCurvesViewSource}, Path=/}" Value="{x:Null}">
<Setter Property="Background" Value="Red"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</Label.Style>
</Label>
The above will change the background of the label to red as long as there is no CurrentItem in the "pumpCurvesViewSource", but what I really want to do is change the background trigger to this:
<Setter Property="Content" Value="No pump curve selected"></Setter>
But this does not work (I'm guessing it is because the Content is already bound and my setting would override the binding).
Does anyone know how to accomplish this?