Modern software trends

How to hide Titlebar in UWP Application



With this little piece of code you can hide the you can hide the default title bar (headline) for any UWP Application. For single application embedded use its recommende to setup Windows to Kiosk mode

    public sealed partial class MainPage : Page
    {
        public MainPage()
        {
            CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;
            Window.Current.SetTitleBar(null);
            ApplicationView view = ApplicationView.GetForCurrentView();
            view.TryEnterFullScreenMode();

            var titleBar = ApplicationView.GetForCurrentView().TitleBar;
            titleBar.ButtonHoverBackgroundColor = Colors.Transparent;
            titleBar.ButtonBackgroundColor = Colors.Transparent;
            titleBar.ButtonForegroundColor = Colors.Transparent;
            titleBar.ButtonHoverForegroundColor = Colors.Transparent;
            titleBar.ButtonInactiveBackgroundColor = Colors.Transparent;
            titleBar.ButtonInactiveForegroundColor = Colors.Transparent;
            titleBar.ButtonPressedBackgroundColor = Colors.Transparent;
            titleBar.ButtonPressedForegroundColor = Colors.Transparent;

Post a Comment

0 Comments