UWP/WinRT: How to use VisualState Triggers to change the styling of all controls of a certain type?
问题 In my UWP app, I have a series of AppBarButtons separated by AppBarSeparators . When the window size drops below a certain amount, I want to hide the AppBarSeparators to save space. I tried something like this, but it didn't work: <VisualState.Setters> <Setter Target="AppBarSeparator" Value="Collapsed"/> </VisualState.Setters> I understand it's not possible to give each of the AppBarSeparators labels so I can target them directly, because they are dynamically generated as part of a binding.