<TextBlock Text="{Binding MyTextProperty}">
<TextBlock.Style>
<Style TargetType="{x:Type TextBox}">
<Style.Triggers>
<DataTrigger Binding="{Binding MyTextProperty}" Value="{x:Null}">
<Setter Property="Text" Value="Hey, the text should not be empty!" />
<Setter Property="Foreground" Value="Red" />
</DataTrigger>
</Style.Triggers>
</Style>
</TextBlock.Style>
</TextBlock>
Question 1: Why is <Style TargetType="{x:Type TextBox}">
giving the error The type 'x:Type' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
Question 2: Why am I getting the error The attachable property 'Triggers' was not found in type 'Style'.
Am I missing anything ?