Given a button (or a combobox, or any control for that matter):
<Button x:Name="button" Command="{Binding DoStuff}" Margin="10,0,5,5" Content="Do Stuff!" Style="{StaticResource buttonDefaults}"/>
With the style:
<Style x:Key="buttonDefaults" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Style.Resources>
<ResourceDictionary Source="/PresentationFramework.Aero;component/themes/Aero.NormalColor.xaml"/>
</Style.Resources>
<Setter Property="Background">
<Setter.Value>
<RadialGradientBrush>
<GradientStop Color="#F4083268" Offset="1"/>
<GradientStop Color="#FE5C9247"/>
</RadialGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontFamily" Value="Arial"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Focusable" Value="False"/>
</Style>
It looks very different in Windows 8 than it does in Windows 7.
Now, the strange part is that in the DESIGNER, everything looks perfect on a Windows 8 machine as if it were Windows 7... But at runtime, the style isn't "applied."
On the other hand, it looks perfect on Windows 7 in both the designer and runtime. Is there a way to fix this?
Additional Details:
With the RD in the Style:
<Style x:Key="buttonDefaults" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Style.Resources>
<ResourceDictionary Source="/PresentationFramework.Aero,Version=4.0.0.0,Culture=Neutral,PublicKeyToken=31bf3856ad364e35,processorArchitecture=MSIL;component/themes/Aero.NormalColor.xaml"/>
</Style.Resources>
<Setter Property="Background">
<Setter.Value>
<RadialGradientBrush>
<GradientStop Color="#F4083268" Offset="1"/>
<GradientStop Color="#FE5C9247"/>
</RadialGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontFamily" Value="Arial"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Focusable" Value="False"/>
</Style>
With the RD in the Application scope:
<Application.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/PresentationFramework.Aero,Version=4.0.0.0,Culture=Neutral,PublicKeyToken=31bf3856ad364e35,processorArchitecture=MSIL;component/themes/Aero.NormalColor.xaml"/>
</ResourceDictionary.MergedDictionaries>
<Style x:Key="buttonDefaults" TargetType="Button" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Background">
<Setter.Value>
<RadialGradientBrush>
<GradientStop Color="#F4083268" Offset="1"/>
<GradientStop Color="#FE5C9247"/>
</RadialGradientBrush>
</Setter.Value>
</Setter>
<Setter Property="BorderBrush" Value="Transparent"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="FontFamily" Value="Arial"/>
<Setter Property="FontSize" Value="16"/>
<Setter Property="Focusable" Value="False"/>
</Style>
</ResourceDictionary>
</Application.Resources>
I'd like to apply the visuals of the second one to just a single style, not the entire application.