前台
<Page.Resources>
<ResourceDictionary Source="MyDic.xaml"/>
</Page.Resources>
<Grid Background="{StaticResource ApplicationPageBackgroundThemeBrush}">
<Button Content="按钮1" FontSize="30" Style="{StaticResource style1}"/>
<Button Content="按钮2" FontSize="30" Style="{StaticResource style2}"/>
</Grid>
再建立一个“资源字典”(Dictionary1.xaml)
<ReSourceDictionary....>
<Style x:Key="style1" TargetType="Button">
<setter property="Background" value="Blue"/>
<setter property="Background" value="Red"/>
</Style>
<Style x:Key="style2" TargetType="Button">
<setter property="Background" value="Red"/>
<setter property="Background" value="Blue"/>
</Style>
</ReSourceDictionary>