Full Screen Mode In Windows 10 App

Here are the steps: 

Step 1: Open a blank app and add a button from the toolbox or by copying the following XAML code into your grid.
  1. <Button x:Name="fullScreenButton" HorizontalAlignment="Center" VerticalAlignment="Center" Content="Full Screen"  Click="fullScreenButton_Click"/>  
 

Step 2: Add the following namespaces to your project which is needed in further C# code.

  1. using Windows.UI.ViewManagement;  

Step 3:

Copy and paste the following code to the cs page which will be called on button click event and will enable full screen if not and will be back to the current screens size if clicked again:

  1. private void fullScreenButton_Click(object sender, RoutedEventArgs e)  
  2. {  
  3.     var view = ApplicationView.GetForCurrentView();  
  4.     if (view.IsFullScreenMode)  
  5.     {  
  6.         view.ExitFullScreenMode();  
  7.     }  
  8.     else  
  9.     {  
  10.         view.TryEnterFullScreenMode();  
  11.     }  
  12. }  

Step 4: Run your application and test yourself.


Similar Articles