Skip to content

Instantly share code, notes, and snippets.

@colinkiama
Created May 14, 2017 23:20
Show Gist options
  • Save colinkiama/16083f02a90b8cefc11fc6855e4081bc to your computer and use it in GitHub Desktop.
Save colinkiama/16083f02a90b8cefc11fc6855e4081bc to your computer and use it in GitHub Desktop.
Code that extends the window content into the title bar
//Inside OnLaunched method in App.Xaml.cs
var appView = Windows.UI.ViewManagement.ApplicationView.GetForCurrentView();
if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Winodows.UI.ViewManagemnt.ApplicationViewTitleBar))
{
ApplicationViewTitleBar formattableTitleBar = appView.TitleBar;
formattableTitleBar.ButtonBackgroundColor = Colors.Transparent;
CoreApplicationViewTitleBar coreTitleBar = CoreApplication.GetCurrentView().TitleBar;
coreTitleBar.ExtendViewIntoTitleBar = true;
appView.SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment