[WP8.1]当包含在具有边距的网格中时,将忽略Page.Background [英] [WP8.1]Page.Background is ignored when contained in a grid with a margin

查看:44
本文介绍了[WP8.1]当包含在具有边距的网格中时,将忽略Page.Background的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

(Windows运行时8.1)

(Windows Runtime 8.1)

通常,手机应用程序会设置如下框架:

Typically a phone app would set up the frame like this:

Window.Current.Content - >框架 - > Page。

Window.Current.Content -> Frame -> Page.

但我以这种方式设置我的框架:

But I've set up my frame in this way instead:

Window.Current.Content - >网格 - >框架 - > Page。

Window.Current.Content -> Grid -> Frame -> Page.

这样可以正常工作,但是如果我对网格应用边距,或者布局网格的子节点是这样的,页面不占用整个屏幕,页面背景将被忽略。

This works fine, but if I apply a margin to the grid, or layout the grid's children is such a way that the page doesn't take up the whole screen, the page background will be ignored.

我有两个问题:


  1. 最重要的是,为什么会出现这种情况?是否存在技术原因?
  2. 如何使Page.Background工作(不依赖于设置页面根元素的背景以达到类似的效果)?




推荐答案

你能在这里发布一个转载的项目吗?

Can you post a reproduced project in here?


这篇关于[WP8.1]当包含在具有边距的网格中时,将忽略Page.Background的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆