question

ansalc-1556 avatar image
0 Votes"
ansalc-1556 asked ·

Remove Title Bar

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

windows-uwp
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

RoyLi-MSFT avatar image
1 Vote"
RoyLi-MSFT answered ·

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 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello RoyLi,

Many thanks for your help, which fully answers my needs.

I am using Visual Basic and have included the following line right after the MainPage_Loaded event (it has a slightly different syntax):

Core.CoreApplication.GetCurrentView.TitleBar.ExtendViewIntoTitleBar = True

I am launching a camera in WebView and now, when I set the camera view to full screen viewing I can see a bigger, and thus, clearer, image.

Thank you also for the link to Title bar customization.

I have some experience in VB and am beginning now with UWA and I must say I am very impressed with it.

Regards,

Antonio


0 Votes 0 ·