I have a UWP app and have a visual state trigger in xaml like so
<VisualStateManager.VisualStateGroups>
<VisualStateGroup x:Name="WindowStates">
<VisualState x:Name="WideState">
<VisualState.StateTriggers>
<AdaptiveTrigger MinWindowWidth="850" />
</VisualState.StateTriggers>
<VisualState.Setters>
<!-- <Setter Target="MenuGrid.Grid.Background" Value="LightYellow" /> -->
</VisualState.Setters>
</VisualState>
<VisualState x:Name="NarrowState"> ...
Now i would like to disable one of the visual states or remove the trigger completely programmatically in code. Is there a way of doing that?