How can I change the Foreground color of a TextBlock with a Trigger?
问题 I want to change foreground color of a TextBlock from dependencyproperty. But I don't change textblock color. I don't know this problem in my code. How can I change the foreground color of a TextBlock with a Trigger? XAML: <TextBlock Name="TestBlock" Text="Test color" > <TextBlock.Style> <Style TargetType="TextBlock"> <Style.Triggers> <Trigger Property ="IsMouseOver" Value="True"> <Setter Property= "Foreground" Value="Gray"/> </Trigger> <DataTrigger Binding="{Binding Path=TestColorMode2,