Hi,
In an WPF app, I am trying to use the Aero theme in XP.
I currently have this:
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="/PresentationFramework.Aero, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, ProcessorArchitecture=MSIL;component/themes/aero.normalcolor.xaml" />
</ResourceDictionary.MergedDictionaries>
<Style TargetType="{x:Type Button}" BasedOn="{StaticResource {x:Type Button}}">
<Setter Property="Height" Value="25"/>
<Setter Property="Padding" Value="5,0"/>
</Style>
</ResourceDictionary>
What I am trying to do is to use the Aero theme for the Button, but also to add Height and Padding for all the buttons on the app.
Currently it will throw a stack overflow exception at runtime.
Note:
I tried this already:
<Style TargetType="{x:Type Button}">
<Setter Property="Height" Value="25"/>
<Setter Property="Padding" Value="5,0"/>
</Style>
It will ignore the Aero theme.