我想在 wpf 中 Text 属性为空或为空时更改 TextBlock 的可见性,我们可以轻松地做到这一点:
<Style TargetType = "TextBlock">
<Setter Property = "Visibility" Value = "Visibile" />
<Style.Triggers>
<Trigger Property = "Text" Value = "">
<Setter Property = "Visibility" Value = "Collapsed" />
</Trigger>
</Style.Triggers>
</Style>
但是触发器在 uwp 中不可用,我该如何在 uwp 中执行此操作?