3

I'm able to manipulate/hide the titlebar in UWP apps for desktops with code from this answer:

ApplicationViewTitleBar formattableTitleBar = ApplicationView.GetForCurrentView().TitleBar;
formattableTitleBar.ButtonBackgroundColor   = Colors.Transparent;
CoreApplicationViewTitleBar coreTitleBar    = CoreApplication.GetCurrentView().TitleBar;
coreTitleBar.ExtendViewIntoTitleBar         = true;

but it doesn't work for the Hololens environment. I've searched the documentation but cannot seem to find a workaround. Is this possible?

Community
  • 1
  • 1
Daniel Szabo
  • 7,181
  • 6
  • 48
  • 65

1 Answers1

1

I think you would need to use the StatusBar class. Referencing this article, I believe the following code should hide the StatusBar.

if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
{
    StatusBar.GetForCurrentView().HideAsync();
}
meng
  • 441
  • 3
  • 9