获取当前手机的背景色方法

方法如下 :

 

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 "; 

            }   

}

 

 

posted @ 2012-06-15 14:21  銱ル╬鎯噹  阅读(212)  评论(0编辑  收藏  举报