Changing the arrow color in WPF Toolkit NumericUpDown control?

后端 未结 2 1843
有刺的猬
有刺的猬 2021-01-22 06:14

Is there a way with a style to target the arrows in the NumericUpDown control from the WPF Toolkit? I want to change the color of the arrows.

相关标签:
2条回答
  • 2021-01-22 06:44

    To add Xceed.Wpf.Toolkit.Themes namespace use this xmlns:theme="clr-namespace:Xceed.Wpf.Toolkit.Themes;assembly=Xceed.Wpf.Toolkit"

    0 讨论(0)
  • 2021-01-22 06:49

    You can override the GlyphNormalForeground color.

    you will have to add the Xceed.Wpf.Toolkit.Themes xmnls namespace to your xaml. (or WpfToolkit.Themes if your using the old version)

    Example:

    <Grid>
        <wpfToolkit:IntegerUpDown  Margin="37,25,0,0" VerticalAlignment="Top" HorizontalAlignment="Left" >
            <wpfToolkit:IntegerUpDown.Style>
                <Style TargetType="{x:Type wpfToolkit:IntegerUpDown}">
                    <Style.Resources>
                        <SolidColorBrush x:Key="{x:Static theme:ResourceKeys.GlyphNormalForegroundKey}"  Color="Red"/>
                    </Style.Resources>
                </Style>
            </wpfToolkit:IntegerUpDown.Style>
        </wpfToolkit:IntegerUpDown>
    </Grid>
    

    Result:

    enter image description here

    0 讨论(0)
提交回复
热议问题