0%

Windows Phone开发 代码引用系统内置资源

在xaml代码中,可以用{StaticResource PhoneAccentBrush}这样的方式引用系统内置的资源,如果需要在代码中引用,可以用下面的方法:

stackPanel1.Background = new SolidColorBrush((Color)Application.Current.Resources["PhoneAccentColor"]);