ApplicationView.ExitFullScreenMode Method


Takes the app out of full-screen mode.

 virtual void ExitFullScreenMode() = ExitFullScreenMode;
void ExitFullScreenMode();
public void ExitFullScreenMode();
function exitFullScreenMode()
Public Sub ExitFullScreenMode ()


This example shows how to toggle full-screen mode and set the PreferredLaunchWindowingMode property.

<Button x:Name="ToggleFullScreenModeButton" Content="Toggle full screen" 
private void ToggleFullScreenModeButton_Click(object sender, RoutedEventArgs e)
    var view = ApplicationView.GetForCurrentView();
    if (view.IsFullScreenMode)
        ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.Auto;
        // The SizeChanged event will be raised when the exit from full-screen mode is complete.
        if (view.TryEnterFullScreenMode())
            ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.FullScreen;
            // The SizeChanged event will be raised when the entry to full-screen mode is complete.


To preserve full-screen mode when a user restarts the app, set PreferredLaunchWindowingMode to FullScreen if the call to TryEnterFullScreenMode returns true. When you call ExitFullScreenMode, you should set PreferredLaunchWindowingMode back to Auto or PreferredLaunchViewSize.

The system raises the CoreWindow.SizeChanged event when the view enters or exits full-screen mode. This is exposed to XAML apps as the Window.SizeChanged event and to HTML apps as the window.resize event.

Applies to

See also