<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:cl="clr-namespace:System.Collections;assembly=mscorlib"
Title="MainWindow" Height="250" Width="450">
<Window.Resources>
<Style TargetType="{x:Type TextBlock}" x:Key="textBlockTest">
<Style.Triggers>
<Trigger Property="Uid" Value="0">
<Setter Property="Foreground" Value="#EEEEEE" />
</Trigger>
<Trigger Property="Uid" Value="1">
<Setter Property="Foreground" Value="#000000" />
</Trigger>
<Trigger Property="Uid" Value="2">
<Setter Property="Foreground" Value="#FFFFFF" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<!-- <Button Style="{StaticResource highlightStyle}" Content="Hight Value" x:Name="btnVisible" Click="Button_Click" />-->
<TextBlock Style="{StaticResource textBlockTest}" Text="TestTrigger" VerticalAlignment="Center" HorizontalAlignment="Center" Uid="1"/>
</Grid>
</Window>
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="clr-namespace:WpfApplication1"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:cl="clr-namespace:System.Collections;assembly=mscorlib"
Title="MainWindow" Height="250" Width="450">
<Window.Resources>
<Style TargetType="{x:Type TextBlock}" x:Key="textBlockTest">
<Style.Triggers>
<Trigger Property="Uid" Value="0">
<Setter Property="Foreground" Value="#EEEEEE" />
</Trigger>
<Trigger Property="Uid" Value="1">
<Setter Property="Foreground" Value="#000000" />
</Trigger>
<Trigger Property="Uid" Value="2">
<Setter Property="Foreground" Value="#FFFFFF" />
</Trigger>
</Style.Triggers>
</Style>
</Window.Resources>
<Grid>
<!-- <Button Style="{StaticResource highlightStyle}" Content="Hight Value" x:Name="btnVisible" Click="Button_Click" />-->
<TextBlock Style="{StaticResource textBlockTest}" Text="TestTrigger" VerticalAlignment="Center" HorizontalAlignment="Center" Uid="1"/>
</Grid>
</Window>