This project has moved and is read-only. For the latest updates, please go here.

How to make the Up/Down buttons of IngegerUpDown wider

Jun 1, 2015 at 8:32 PM
Edited Jun 1, 2015 at 8:49 PM
The following Style could change the color of the IntegerUpDown buttons. I was experimenting with making the up/down buttons wider similarly without success.
<extwpf:IntegerUpDown.Style>
    <Style TargetType="{x:Type extwpf:IntegerUpDown}" BasedOn="{StaticResource StyleField}">
        <Style.Resources>
            <SolidColorBrush x:Key="{x:Static theme:ResourceKeys.GlyphNormalForegroundKey}"  Color="Red"/>
        </Style.Resources>
    </Style>
</extwpf:IntegerUpDown.Style>
The complete definition for the IntegerUpDown control is as follows:
<extwpf:IntegerUpDown Margin="{StaticResource ControlHorizontal}" VerticalAlignment="Center"
    Grid.Column="{Binding Label, Converter={StaticResource LabelToStartColumnConverter}, ConverterParameter=1}"
    Grid.ColumnSpan="{Binding Label, Converter={StaticResource LabelToColumnSpanConverter}, ConverterParameter=1}"
    Value="{Binding ValueNumber, ValidatesOnDataErrors=True, UpdateSourceTrigger=PropertyChanged}" FormatString="N0" Minimum="{Binding Minimum}" Maximum="{Binding Maximum}"
    local:TextInputFilter.AllowedCharacters="0123456789,+-" >
    <extwpf:IntegerUpDown.Style>
        <Style TargetType="{x:Type extwpf:IntegerUpDown}" BasedOn="{StaticResource StyleField}">
            <Style.Resources>
                <SolidColorBrush x:Key="{x:Static theme:ResourceKeys.GlyphNormalForegroundKey}"  Color="Red"/>
            </Style.Resources>
        </Style>
    </extwpf:IntegerUpDown.Style>
</extwpf:IntegerUpDown>
Any help is greatly appreciated.
Thanks,
Jenny
Developer
Jun 3, 2015 at 12:57 PM
Hi,

You can change the value of "SystemParameters.VerticalScrollBarWidthKey" which used to set the width for the ButtonSpinners :
<xctk:IntegerUpDown Value="35"
                             Height="25">
            <xctk:IntegerUpDown.Resources>
               <sys:Double x:Key="{x:Static SystemParameters.VerticalScrollBarWidthKey}">50</sys:Double>
            </xctk:IntegerUpDown.Resources>
</xctk:IntegerUpDown>