Hi,
From what I see, if you want to modify the repeat buttons, you can only set the style for
xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
This way, the ButtonSpinner located in the DatetimeUpDown will use this ButtonSpinner (including the red Background you set), You will also need to declare the following for this style to compile (they are a copy of ButtonSpinner/Themes/Aero2.NormalColor.xaml):
From what I see, if you want to modify the repeat buttons, you can only set the style for
<Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type themes:ResourceKeys}, ResourceId=SpinnerButtonStyleKey}"
TargetType="RepeatButton">
data goes here, including setting a Red Background
</Style>
and remove the<Style TargetType="{x:Type local:ButtonSpinner}">
The other option is redefining the ButtonSpinner. In that case, you don't need to define <Style x:Key="{ComponentResourceKey TypeInTargetAssembly={x:Type themes:ResourceKeys}, ResourceId=SpinnerButtonStyleKey}"
TargetType="RepeatButton">
You can only define <Style TargetType="{x:Type local:ButtonSpinner}">
but what is local ? Are you trying to define another ButtonSpinner ? try replacing "local" for "xctk", which is xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
This way, the ButtonSpinner located in the DatetimeUpDown will use this ButtonSpinner (including the red Background you set), You will also need to declare the following for this style to compile (they are a copy of ButtonSpinner/Themes/Aero2.NormalColor.xaml):
<Geometry x:Key="UpArrowGeometry">M 0,3 C0,3 0,4 0,4 0,4 3,4 3,4 3,4 3,3 3,3 3,3 4,3 4,3 4,3 4,4 4,4 4,4 7,4 7,4 7,4 7,3 7,3 7,3 6,3 6,3 6,3 6,2 6,2 6,2 5,2 5,2 5,2 5,1 5,1 5,1 4,1 4,1 4,1 4,0 4,0 4,0 3,0 3,0 3,0 3,1 3,1 3,1 2,1 2,1 2,1 2,2 2,2 2,2 1,2 1,2 1,2 1,3 1,3 1,3 0,3 0,3 z</Geometry>
<Geometry x:Key="DownArrowGeometry">M 0,1 C0,1 0,0 0,0 0,0 3,0 3,0 3,0 3,1 3,1 3,1 4,1 4,1 4,1 4,0 4,0 4,0 7,0 7,0 7,0 7,1 7,1 7,1 6,1 6,1 6,1 6,2 6,2 6,2 5,2 5,2 5,2 5,3 5,3 5,3 4,3 4,3 4,3 4,4 4,4 4,4 3,4 3,4 3,4 3,3 3,3 3,3 2,3 2,3 2,3 2,2 2,2 2,2 1,2 1,2 1,2 1,1 1,1 1,1 0,1 0,1 z</Geometry>
<BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />
<DataTemplate x:Key="IncreaseGlyphNormalKey">
<Path Width="7"
Height="4"
Data="{StaticResource UpArrowGeometry}"
Fill="{DynamicResource {x:Static themes:ResourceKeys.GlyphNormalForegroundKey}}"
SnapsToDevicePixels="True"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Focusable="False" />
</DataTemplate>
<DataTemplate x:Key="DecreaseGlyphNormalKey">
<Path Width="7"
Height="4"
Data="{StaticResource DownArrowGeometry}"
Fill="{DynamicResource {x:Static themes:ResourceKeys.GlyphNormalForegroundKey}}"
SnapsToDevicePixels="True"
HorizontalAlignment="Center"
VerticalAlignment="Center"
Focusable="False" />
</DataTemplate>