Back to Devexpress

TrackBarZoomStyleSettings.IncrementButtonStyle Property

wpf-devexpress-dot-xpf-dot-editors-dot-trackbarzoomstylesettings-04a2ea3b.md

latest5.6 KB
Original Source

TrackBarZoomStyleSettings.IncrementButtonStyle Property

Gets or sets the TrackBarEdit‘s increment button style. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

Assembly : DevExpress.Xpf.Core.v25.2.dll

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public Style IncrementButtonStyle { get; set; }
vb
Public Property IncrementButtonStyle As Style

Property Value

TypeDescription
Style

The TrackBarEdit’s track bar increment button style.

|

Remarks

The following code sample specifies the IncrementButtonStyle , DecrementButtonStyle, ThumbStyle, and NearTrackStyle properties:

xaml
<Window ...
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
    <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="200" Height="30">
        <StackPanel.Resources>
            <Style x:Key="decrementButtonStyle" TargetType="RepeatButton">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="RepeatButton">
                            <Grid>
                                <Path Data="F1 M 0,8 8,0 8,16 0,8 Z "
                                      HorizontalAlignment="Center" VerticalAlignment="Center"
                                      Margin="0,0,8,0" x:Name="path" Fill="#FF777777" />
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Fill" TargetName="path" Value="#FF6200EE" />
                                </Trigger>
                                <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Fill" TargetName="path" Value="#FFDABEFC" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="incrementButtonStyle" TargetType="RepeatButton">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate TargetType="RepeatButton">
                            <Grid>
                                <Path Data="F1 M 0,0 0,16 8,8 0,0 Z "
                                      HorizontalAlignment="Center" VerticalAlignment="Center"
                                      Margin="8,0,0,0" x:Name="path" Fill="#FF777777" />
                            </Grid>
                            <ControlTemplate.Triggers>
                                <Trigger Property="IsMouseOver" Value="True">
                                    <Setter Property="Fill" TargetName="path" Value="#FF6200EE" />
                                </Trigger>
                                <Trigger Property="IsPressed" Value="True">
                                    <Setter Property="Fill" TargetName="path" Value="#FFDABEFC" />
                                </Trigger>
                            </ControlTemplate.Triggers>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </StackPanel.Resources>
        <dxe:TrackBarEdit Minimum="0" Maximum="100" Value="50">
            <dxe:TrackBarEdit.StyleSettings>
                <dxe:TrackBarZoomStyleSettings DecrementButtonStyle="{StaticResource decrementButtonStyle}"
                                               IncrementButtonStyle="{StaticResource incrementButtonStyle}" />
                </dxe:TrackBarEdit.StyleSettings>
            </dxe:TrackBarEdit>
    </StackPanel>
</Window>

Note

The property is supported in the following DevExpress themes:

Theme FamilyThemes
Windows 11Dark, Light
Windows 10Dark, Light
Office 2019Black, Colorful, Dark Gray, White, HighContrast
Visual Studio 2019Blue, Dark, Light
Office 2016 SEBlack, Colorful, Dark Gray, White
Visual Studio 2017Blue, Dark, Light

See Also

TrackBarZoomStyleSettings Class

TrackBarZoomStyleSettings Members

DevExpress.Xpf.Editors Namespace