<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>
Вопрос 1: Почему <Style TargetType="{x:Type TextBox}">
выдает ошибку The type 'x:Type' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built.
Вопрос 2: Почему я получаю ошибку The attachable property 'Triggers' was not found in type 'Style'.
Я что-то упустил?1009 *