Custom Theme That Overrides Default Theme WP7

后端 未结 3 566
执笔经年
执笔经年 2021-01-06 03:48

Is it possible to create a custom theme and have it used as the default theme?

Every example I can find anywhere says you can create custom themes by copying the

3条回答
  •  既然无缘
    2021-01-06 04:23

    With the release of Windows Phone Mango (7.1), the feature of merging XAML dictionary styles no longer works. Currently, you will have to change the application resource Brush color entry in the code-behind; preferably in constructor of App() in App.xaml.cs.

    Example:

                (App.Current.Resources["PhoneAccentBrush"] as SolidColorBrush).Color = Color.FromArgb(12, 12, 54, 145);
                (App.Current.Resources["PhoneForegroundBrush"] as SolidColorBrush).Color = Colors.Green;
                (App.Current.Resources["PhoneBackgroundBrush"] as SolidColorBrush).Color = Colors.Purple;
    

    Hopefully in the WP8 SDK we will no longer need to do this workaround.

提交回复
热议问题