UWP VisualStateManager Adaptive Triggers don't work inside Data Template

Issue

VisualStateManager Adaptive Triggers do not work when placed inside a ListView Data Template.

Resolution

The issue was resolved by wrapping DateTemplate content inside <UserControl>, something like this:

 
<Page.Resources>
<DataTemplate x:Key="UserListDataTemplate" x:DataType="data:User">
<UserControl>
<RelativePanel>
<VisualStateManager.VisualStateGroups>
......
</VisualStateManager.VisualStateGroups>
</RelativePanel>
</UserControl>
</DataTemplate>
</Page.Resources>
 

Visual Studio 2015
Universal Windows Platform
C#
January 2016

 

Newsletter

Subscribe to receive occasional updates on new posts.
Your email will not be used for any other purpose and you can unsubscribe at any time.
Please wait