您好我想知道为什么我的样式触发器不工作取决于自定义枚举?代码如下:
<Style x:Key="FontAwesomeIconBase"
BasedOn="{StaticResource FontAwesomeFont}"
TargetType="{x:Type Grid}">
<Setter Property="HorizontalAlignment" Value="Stretch" />
<Setter Property="VerticalAlignment" Value="Stretch" />
<Style.Triggers>
<DataTrigger Binding="{Binding Tag}" Value="FontIcon.None">
<Setter Property="Visibility" Value="Hidden"></Setter>
</DataTrigger>
<Trigger Property="Tag" Value="FontIcon.None">
<Setter Property="Visibility" Value="Hidden" />
</Trigger>
<Trigger Property="Tag" Value="None">
<Setter Property="Visibility" Value="Hidden" />
</Trigger>
<Trigger Property="Tag" Value="{x:Null}">
<Setter Property="Visibility" Value="Hidden" />
</Trigger>
</Style.Triggers>
</Style>
我尝试了 DataTrigger 但仍然无法正常工作。有任何想法吗?