Skip to main content
All docs
V24.1

TrackBarEdit.TrackWidth Property

Gets or sets the TrackBarEdit’s width when the TrackBarEdit‘s Orientation is Vertical. This is a dependency property.

Namespace: DevExpress.Xpf.Editors

Assembly: DevExpress.Xpf.Core.v24.1.dll

NuGet Package: DevExpress.Wpf.Core

Declaration

public double TrackWidth { get; set; }

Property Value

Type Description
Double

The TrackBarEdit’s width, in pixels.

Remarks

The following code sample specifies the TrackWidth, FarTrackStyle, NearTrackStyle, and ThumbStyle properties.

<Window ...
    xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors">
    <StackPanel>
        <StackPanel.Resources>
            <Style x:Key="trackBarEditThumbStyle" TargetType="Thumb">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Ellipse Width="20" Height="20" Fill="Blue" />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="nearTrackStyle" TargetType="RepeatButton">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Border Background="#FF6200EE" Width="8"
                                    HorizontalAlignment="Center" CornerRadius="4"
                                    Margin="0,-5,0,0" />
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
            <Style x:Key="farTrackStyle" TargetType="RepeatButton">
                <Setter Property="Template">
                    <Setter.Value>
                        <ControlTemplate>
                            <Border Background="Red" Width="8"
                                    HorizontalAlignment="Center" CornerRadius="4"
                                    Margin="0,0,0,-5"/>
                        </ControlTemplate>
                    </Setter.Value>
                </Setter>
            </Style>
        </StackPanel.Resources>
        <dxe:TrackBarEdit Margin="5" Minimum="0" Maximum="100" Value="50"
                          Background="#FFDABEFC" BorderBrush="#FFDABEFC"
                          dxe:EditorAppearanceProperties.FocusedBorderBrush="#FFDABEFC"
                          CornerRadius="4" TrackWidth="8" TickPlacement="None"
                          Orientation="Vertical"
                          NearTrackStyle="{StaticResource nearTrackStyle}"
                          FarTrackStyle="{StaticResource farTrackStyle}"
                          ThumbStyle="{StaticResource trackBarEditThumbStyle}" />
    </StackPanel>
</Window>

TrackBarEdit - Appearance Properties

Note

The property is supported in the following DevExpress themes:

Theme Family Themes
Windows 11 Dark, Light
Windows 10 Dark, Light
Office 2019 Black, Colorful, Dark Gray, White, HighContrast
Visual Studio 2019 Blue, Dark, Light
Office 2016 SE Black, Colorful, Dark Gray, White
Visual Studio 2017 Blue, Dark, Light
See Also