【问题标题】:Overlay the whole AppBar on the page content in windows phone 8.1在windows phone 8.1的页面内容上覆盖整个AppBar
【发布时间】:2015-03-04 15:46:44
【问题描述】:

当应用栏存在时,应用栏的高度会影响页面其余部分的内容。 例如,如果应用栏在ClosedDisplayMode="Minimal" 时具有大约 25px 的Height,则页面上的其余内容 (rootGrid) 的实际高度将为屏幕高度 - 25px。所以应用栏不会覆盖在页面内容上。

这在内容为VerticalAlignment="Center"Bottom 时尤其可见。

有什么办法可以避免这种情况吗? AppBar 上的 ZIndex 之类的东西,这样它就显示在页面内容上,而不是在屏幕底部修剪它。

【问题讨论】:

    标签: xaml windows-phone windows-phone-8.1 appbar


    【解决方案1】:

    可以告诉渲染器在渲染时应该使用整个“窗口”,而不仅仅是可见部分。通过调用Windows.UI.ViewManagement.ApplicationView.GetForCurrentView().SetDesiredBoundsMode(ApplicationViewBoundsMode.UseCoreWindow),渲染器将包含窗口镶边下方的区域(即屏幕顶部的系统托盘和底部的应用程序栏)。 chrome 将始终位于从 xaml 呈现的任何内容之上。

    ApplicationView 记录在here

    如果您不希望屏幕顶部的系统托盘与内容重叠,则必须使用可见 xaml 的根容器上的边距进行补偿。

    【讨论】:

      猜你喜欢
      • 2015-01-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-06-25
      相关资源
      最近更新 更多