You should use VisualStateManager in xaml for a complete xaml solution:
<Grid x:Name="LayoutRoot"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="OrientationStates"> <VisualState x:Name="Full"/> <VisualState x:Name="Fill"/> <VisualState x:Name="Portrait"/> <VisualState x:Name="Snapped"/> </VisualStateGroup> </VisualStateManager.VisualStateGroups> </Grid>
Create StoryBoards for each VisualState and hide / show items in your xaml. Microsoft's examples use the same solution.
-
Update
I searched the network and found the correct states, an example behind this link: MSDN .
<VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="ApplicationViewStates"> <VisualState x:Name="FullScreenLandscape"/> <VisualState x:Name="Filled"/> <VisualState x:Name="FullScreenPortrait"/> <VisualState x:Name="Snapped"/> </VisualStateGroup> </VisualStateManager.VisualStateGroups>
The states reflect the ApplicationViewState enumeration. More information can be found here .
Kolky
source share