【问题标题】:How to override Accent color and Default background color windows phone 8如何覆盖强调色和默认背景色 windows phone 8
【发布时间】:2013-06-14 06:53:11
【问题描述】:

我想将整个应用程序中的强调色更改为自定义颜色。
目前,无论在“设置”中选择什么,它都会出现
还需要更改页面的默认背景颜色

【问题讨论】:

    标签: windows-phone-8


    【解决方案1】:

    你可以把这个放在App.xml.cs构造函数中

    //This will change the default accent color
    (App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush).Color = Colors.Green;
    
    //This will change the default background color for pages
    (App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush).Color = Colors.White;
    
    //other code
    


    同样,您可以更改Theme resources for Windows Phone中指定的其他画笔/颜色

    【讨论】:

      猜你喜欢
      • 2012-02-20
      • 2012-12-26
      • 1970-01-01
      • 1970-01-01
      • 2021-09-19
      • 2021-07-08
      • 2015-05-26
      • 2013-02-09
      • 1970-01-01
      相关资源
      最近更新 更多