如何在WPF样式中为视觉状态添加条件?
我的意思是这样的:
<VisualState Name="Focused">
<Storyboard>
<!--if TAG parameter == "RED"-->
<ColorAnimation Storyboard.TargetName="container" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
Duration="0:0:0.05" To="Red"></ColorAnimation>
<!--if TAG parameter == "BLUE"-->
<ColorAnimation Storyboard.TargetName="container" Storyboard.TargetProperty="(Border.BorderBrush).(SolidColorBrush.Color)"
Duration="0:0:0.05" To="Blue"></ColorAnimation>
</Storyboard>
</VisualState>
我想设置一个文本框“ Tag”参数,正确的方法是什么?