wish of those help The margin of the grid changes to default again because your VisualState are in same VisualStateGroup. You can set the AnimationState in another VisualStateGroup to maintain changes made by the AdaptiveTrigger. See the Remarks of VisualStateGroup class.
seems to work fine I would maintain the ListView selection in a property of the viewmodel and bind Grid.Visibility to that property. You will need an IValueConverter to convert from the selected item's datatype to System.Windows.Visibility, which is required for Grid.Visibility binding. In case the logic to determine visiblity is more complex, e.g. requires application state, you could add a property bool IsImportantItemSelected to the viewmodel and bind Grid.Visibility to this property. This approach allows you to keep the complex logic in the viewmodel. You'd need an IValueConverter again to convert from bool to System.Windows.Visibility.
Multiple VisualState Triggers for a single Visual State
Any of those help Ok. As there is no built in MultiTrigger, I wrote my own MultiTrigger. The multi trigger supports AND and OR conditions, which is exactly what I needed. It is now included in the NuGet Package AdaptiveTriggerLibrary.
UWP/WinRT: How to use VisualState Triggers to change the styling of all controls of a certain type?
I wish this help you As we've discussed in the comment, your AppBarSeparators are generated in the Pivot's DataTemplate, when controls are placed inside the DateTemplate, they becomes the visual structure of your data objects, but VisualState targets the controls, so can it not work here. You can use DataBinding with Converter to do this, and if the size of the window is changeable during the run-time, you may also need complete your data source class with INotifyPropertyChanged Interface.
Hope this helps I think that I have found the answer. I need to override the function OnApplyTemplate() in my custom control. I have extended the code of the CustomButton class with the following function: