获取当前手机的背景色方法
方法如下 :
public MainPage()
{
InitializeComponent();
Color themebackground = (Color)Application.Current.Resources["PhoneForegroundColor"];
if (themebackground.ToString() == "#FFFFFFFF")
{
this.PageTitle.Text = "Dark ";
}
else if (themebackground.ToString() == "#DE000000")
{
this.PageTitle.Text = "Light ";
}
}