[英]change background color of wp8 app layout
I'm interested to know, How can I change the background color through programming in WP8 App. 我很想知道,如何通过WP8 App中的编程来更改背景颜色。 When I navigate between the pages in my app, the background color that appears is visible at the moment of swiping pages which is either white or black(depends on theme)
当我在应用程序的页面之间导航时,在滑动页面时可以看到白色或黑色的背景色(取决于主题)
Today I had downloaded Imagefusion
app from the Store, where background color you see while navigating between pages is light beige, but not white/black. 今天,我从商店下载了
Imagefusion
应用程序,在页面之间导航时看到的背景色是浅米色,但不是白色/黑色。 Do you know how can I change the background color of the app layout? 您知道如何更改应用程序布局的背景颜色吗? Thank you.
谢谢。
I'm using c#, visual studio 2013. 我正在使用C#,Visual Studio 2013。
you must be having Grid at top most layer say gridRoot
您必须在最顶层使用Grid,例如
gridRoot
then, If you want to change its background color programmatically then use: 然后,如果要以编程方式更改其背景颜色,请使用:
gridRoot.Background = new SolidColorBrush( Colors.YourColor);
As you haven't set background color to Grid, it shows default color ie your theme color. 由于您尚未将背景颜色设置为“网格”,因此它将显示默认颜色,即主题颜色。
http://social.msdn.microsoft.com/Forums/en-US/e0fddd42-ecb9-4a2b-b5e5-10f464cdf3e6/change-background-other-than-dark-or-light-in-app?forum=wpdevelop http://social.msdn.microsoft.com/Forums/zh-CN/e0fddd42-ecb9-4a2b-b5e5-10f464cdf3e6/change-background-other-than-dark-or-light-in-app?forum=wpdevelop
Here is the easiest way that fits my expectations. 这是符合我期望的最简单的方法。 I guess this method also works.
我猜这种方法也可以。 Thank you very much for your help.
非常感谢您的帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.