How to extend a UWP page into the titlebar

If you want your page/view to extend into the title bar area (in other words no longer having a title bar), then OnLaunched add the following

CoreApplication.GetCurrentView().TitleBar.ExtendViewIntoTitleBar = true;

and add this using clause

using Windows.ApplicationModel.Core;