user7849697 user7849697 - 1 month ago 19
C# Question

UWP start application fullscreen and don't show minimize and close button

How can you remove the titlebar and buttons in a UWP application? And always start in fullscreen. In WPF this is easy but can't find how to remove the buttons in UWP.

Answer Source

Tre below code in App.Xaml.cs (may be in onlaunched)

To remove the title bar.

CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
Window.Current.SetTitleBar(null);

To make it full screen (which also removes buttons)

ApplicationView view = ApplicationView.GetForCurrentView();
view.TryEnterFullScreenMode();

Need to import

using Windows.ApplicationModel.Core;
using Windows.UI.ViewManagement;