Created
May 14, 2017 23:20
-
-
Save colinkiama/16083f02a90b8cefc11fc6855e4081bc to your computer and use it in GitHub Desktop.
Code that extends the window content into the title bar
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//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