I will create a grid for half screen mode and the Visibility=Collapsed
I choose to put image in this grid
<Grid x:Name=”Snap” Visibility=”Collapsed” >
<Image Stretch=”Fill” Source=”Assets/mr-peabody-and-sherman-wallpaper-7-2014-hd.jpg” />
</Grid>
Step 2
In Cs of this page, we will create a function to Handel the page view
when the view is full screen my grid will be Collapse and in other cases my grid will be Visible
private void ViewHandler()
{
ApplicationView current = ApplicationView.GetForCurrentView();
if (current.IsFullScreen)
{
//snap is the name of the grid
Snap.Visibility = Visibility.Collapsed;
}
else
{
//snap is the name of the grid
Snap.Visibility = Visibility.Visible;
}
}
Step 3 :
create function to check the size of my page if the Size Changed I will use my function ViewHandler();
void Current_SizeChanged(object sender,Windows.UI.Core.WindowSizeChangedEventArgs e)
{
ViewHandler();
}
Step 4
I will call the Current_SizeChanged in OnNavigatedTo
protected override void OnNavigatedTo(NavigationEventArgs e)
{
Window.Current.SizeChanged += Current_SizeChanged;
}