How the uwp app for Windows is full screen instead of maximized.

Anonymous
2023-11-16T14:08:21.14+00:00

How the uwp app for Windows is full screen instead of maximized.

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments
{count} votes

Accepted answer
  1. Wesley Li-MSFT 4,571 Reputation points Microsoft External Staff
    2023-11-30T07:39:27.93+00:00

    Hello

    To make a UWP (Universal Windows Platform) app run in full screen mode by default, you can set the ApplicationView.PreferredLaunchWindowingMode to ApplicationViewWindowingMode.FullScreen in the App.xaml.cs constructor. Here’s how you can do it:

    public App()
    {
        ApplicationView.PreferredLaunchWindowingMode = ApplicationViewWindowingMode.FullScreen;
    }
    
    

    To toggle full screen mode, you can use the following code:

    var view = ApplicationView.GetForCurrentView();
    if (view.IsFullScreenMode)
    {
        view.ExitFullScreenMode();
    }
    else
    {
        view.TryEnterFullScreenMode();
    }
    
    

    Also, you can easily full screen almost any UWP apps in Windows 10 just by hitting Shift + Win + Enter after focusing a UWP app.

    Please note that these codes are available only in Windows 10 universal app. Make sure to add ‘using Windows.UI.ViewManagement;’ to the top off your App.xaml.cs.

    Remember, even without specifying any of the code above, when you open your app inside a Windows 10 tablet or a Windows 10 desktop with Tablet Mode enabled, the app will automatically maximize itself to full screen. As long as your app is available on Windows 10 Desktop devices, it’s recommended not to set it to full screen at start-up because UX wise it’s a lot easier for desktop users to work with windowed applications.

    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.