Back to Devexpress

TrackBarEdit.TickAlternationCount Property

wpf-devexpress-dot-xpf-dot-editors-dot-trackbaredit-a27ea8dc.md

latest2.5 KB
Original Source

TrackBarEdit.TickAlternationCount Property

Gets or sets the alternate tick frequency. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public int TickAlternationCount { get; set; }
vb
Public Property TickAlternationCount As Integer

Property Value

TypeDescription
Int32

An integer value that is the alternate tick frequency. By default, 0.

|

Remarks

TrackBarEdit allows you to alternate ticks. Use the AlternationCount property to set the alternate tick frequency.

Use the tick’s AlternationIndex property to get the current tick’s alternation index.

Example

The code sample below demonstrates how to display large ticks with labels each 10 steps and display medium-sized ticks for steps like 5, 15, 25, 35, etc.

xml
xmlns:dxe="http://schemas.devexpress.com/winfx/2008/xaml/editors"

<dxe:TrackBarEdit 
                 Margin="20" 
                 TickAlternationCount="10" 
                 TickFrequency="1" 
                 TickPlacement="BottomRight">
    <dxe:TrackBarEdit.TickItemContainerStyle>
        <Style TargetType="dxe:TrackBarEditTickItem">
            <Style.Triggers>
                <Trigger Property="AlternationIndex" Value="0">
                    <Setter Property="TickLength" Value="10" />
                    <Setter Property="DisplayMode" Value="TickAndText" />
                </Trigger>
                <Trigger Property="AlternationIndex" Value="5">
                    <Setter Property="TickLength" Value="6" />
                </Trigger>
            </Style.Triggers>
        </Style>
    </dxe:TrackBarEdit.TickItemContainerStyle>
</dxe:TrackBarEdit>

The image below illustrates the result.

See Also

TrackBarEdit Class

TrackBarEdit Members

DevExpress.Xpf.Editors Namespace