Back to Devexpress

TrackBarEdit.ValueToolTipContentTemplate Property

wpf-devexpress-dot-xpf-dot-editors-dot-trackbaredit-12f91b59.md

latest2.4 KB
Original Source

TrackBarEdit.ValueToolTipContentTemplate Property

Gets or sets a template that presents the content of a track bar value tooltip. This is a dependency property.

Namespace : DevExpress.Xpf.Editors

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

NuGet Package : DevExpress.Wpf.Core

Declaration

csharp
public DataTemplate ValueToolTipContentTemplate { get; set; }
vb
Public Property ValueToolTipContentTemplate As DataTemplate

Property Value

TypeDescription
DataTemplate

A DataTemplate object that represents the data template.

|

Remarks

To format the range tooltip, you can use the ValueToolTipContentTemplate property. When the track bar is in the Range edit mode, the ValueToolTipContentTemplate ‘s data context is an object of the TrackBarEditRange type.

The code sample below demonstrates how to format the tooltip that displays the selected range:

xaml
<dxe:TrackBarEdit
    TickFrequency="10"
    TickItemDisplayMode="TickAndText"
    ValueToolTipPlacement="TopLeft">
    <dxe:TrackBarEdit.ValueToolTipContentTemplate>
        <!-- The data context is an object of DevExpress.Xpf.Editors.TrackBarEditRange type. -->
        <DataTemplate>
            <TextBlock Text="{DXBinding '`From ` + SelectionStart + ` to ` + SelectionEnd'}" />
        </DataTemplate>
    </dxe:TrackBarEdit.ValueToolTipContentTemplate>
    <dxe:TrackBarEdit.StyleSettings>
        <dxe:TrackBarRangeStyleSettings />
    </dxe:TrackBarEdit.StyleSettings>
</dxe:TrackBarEdit>

Tip

The code sample above uses DXBinding.

See Also

TrackBarEdit Class

TrackBarEdit Members

DevExpress.Xpf.Editors Namespace