有没有一种方法可以通过WPF Toolkit将NumericUpDown控件中的箭头作为样式的目标?我想改变箭头的颜色。
发布于 2013-02-14 00:26:59
您可以覆盖GlyphNormalForeground
颜色。
您必须将xmnls名称空间添加到Xceed.Wpf.Toolkit.Themes
中。(如果您使用的是旧版本,则为WpfToolkit.Themes )
示例:
<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>
结果:
发布于 2014-01-13 14:19:26
要添加Xceed.Wpf.Toolkit.Themes命名空间,请使用此xmlns:theme="clr-namespace:Xceed.Wpf.Toolkit.Themes;assembly=Xceed.Wpf.Toolkit“
https://stackoverflow.com/questions/14865232
复制