Remove Title Bar

ansalc 436 Reputation points
2020-04-19T10:55:43.12+00:00

Is it possible to not display or remove the MainPage Title bar in an Universal Windows App?

Universal Windows Platform (UWP)
0 comments No comments
{count} votes

Accepted answer
  1. Roy Li - MSFT 32,731 Reputation points Microsoft Vendor
    2020-04-20T06:31:34.95+00:00

    Hello,

    Welcome to Microsoft Q&A!

    >>Is it possible to not display or remove the MainPage Title bar in an Universal Windows App?

    May I know why you want to remove the title bar? Could you please share the expected behavior that you want to achieve?

    In general, we can not remove the title bar but we could hide the title of the title bar (the buttons can not be hidden). UWP provides API-CoreApplicationViewTitleBar.ExtendViewIntoTitleBar Property that could hide the title bar and extend your app’s client area to cover the entire window, including the title bar area.

    Code:

                // change the button background to transparent  
                //var titleBar = ApplicationView.GetForCurrentView().TitleBar;  
                //titleBar.ButtonBackgroundColor = Colors.Transparent;  
                
                // Hide default title bar.  
                //var coreTitleBar = CoreApplication.GetCurrentView().TitleBar;  
                //coreTitleBar.ExtendViewIntoTitleBar = true;  
    

    For more information, please refer to this document: Title bar customization.

    Is this solution acceptable to you? If you have other questions, feel free to let me know.

    Thank you.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful