如何在Hololens UWP应用程序中隐藏标题栏

如何在Hololens UWP应用程序中隐藏标题栏,uwp,hololens,Uwp,Hololens,我能够使用answer中的代码操纵/隐藏桌面UWP应用程序中的标题栏: 但它不适用于全息透镜环境。我已经搜索了文档,但似乎找不到解决方法。这可能吗?我认为您需要使用该类。参考这一点,我认为下面的代码应该隐藏状态栏 if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar")) { StatusBar.GetForCurrentView().HideAs

我能够使用answer中的代码操纵/隐藏桌面UWP应用程序中的标题栏:


但它不适用于全息透镜环境。我已经搜索了文档,但似乎找不到解决方法。这可能吗?

我认为您需要使用该类。参考这一点,我认为下面的代码应该隐藏状态栏

if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
{
    StatusBar.GetForCurrentView().HideAsync();
}
if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.UI.ViewManagement.StatusBar"))
{
    StatusBar.GetForCurrentView().HideAsync();
}