【问题标题】:How to Hide TitleBar in Hololens UWP App如何在 Hololens UWP 应用中隐藏标题栏
【发布时间】:2016-10-08 05:32:03
【问题描述】:

我可以使用来自this 答案的代码来操作/隐藏桌面 UWP 应用程序中的标题栏:

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

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

【问题讨论】:

    标签: uwp hololens


    【解决方案1】:

    我认为您需要使用 StatusBar 类。引用这个article,我相信下面的代码应该隐藏了StatusBar。

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-09-29
      • 2021-11-04
      • 1970-01-01
      • 1970-01-01
      • 2016-05-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多