In This Article

RangeSliderMark Class

The mark control for a RangeSlider control.

[TemplatePart(Name = "PART_TrackDecoration", Type = typeof(FrameworkElement))]
public class RangeSliderMark : ContentControl, IOrientedElement
Inheritance:
object Visual UIElement FrameworkElement Control ContentControl object
Implements:
IOrientedElement

Constructors

RangeSliderMark()

Initializes an instance of the class.

public RangeSliderMark()

Properties

ContentPlacement

Indicates the placement of the content.

public RangeSliderPlacement ContentPlacement { get; set; }

Property Value

RangeSliderPlacement:

The default value is BottomRight.

Index

Gets the index of this mark relative to other marks on a RangeSlider where smaller values are closer to the near side (i.e., left side for horizontal slider orientation or top for vertical slider orientation).

public int Index { get; }

Property Value

int

IsActive

Indicates if the mark is included in the range of the owner slider.

public bool IsActive { get; }

Property Value

bool:

true if the mark is included in the range of the owner slider; otherwise, false.

IsContentVisible

Indicates if the content of the mark is visible.

public bool IsContentVisible { get; set; }

Property Value

bool:

The default value is true.

IsTrackDecorationVisible

Indicates if the track decoration of the mark is visible.

public bool IsTrackDecorationVisible { get; set; }

Property Value

bool:

The default value is true.

Orientation

The orientation of the control.

public Orientation Orientation { get; set; }

Property Value

Orientation:

The default value is Horizontal.

SnapDistance

The minimum distance between a dragged thumb and this mark before the thumb snaps to the same value as this mark.

public double SnapDistance { get; set; }

Property Value

double:

Set to 0 to disable snapping. The default value is 0.

Value

The range value associated with the mark.

public double Value { get; set; }

Property Value

double

ValueContentConverter

The converter, if any, that is used to convert a value for display.

public IValueConverter? ValueContentConverter { get; set; }

Property Value

IValueConverter

See Also

ValueFormat

The format used when displaying the value as content.

public string? ValueFormat { get; set; }

Property Value

string

Remarks

This value can be defined as a numeric (e.g., "G") or composite (e.g., "{0:G}") format string. This property is ignored when a ValueContentConverter is defined.

Methods

ArrangeOverride(Size?)

Called to arrange and size the content of a Control object.

protected override Size? ArrangeOverride(Size? finalSize)
Parameter Type Description
finalSize Size

Returns

Size:

The size of the control.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnPropertyChanged(DependencyPropertyChangedEventArgs?)

Invoked whenever the effective value of any dependency property on this FrameworkElement has been updated. The specific dependency property that changed is reported in the arguments parameter. Overrides System.Windows.DependencyObject.OnPropertyChanged(System.Windows.DependencyPropertyChangedEventArgs).

protected override void OnPropertyChanged(DependencyPropertyChangedEventArgs? e)
Parameter Type Description
e DependencyPropertyChangedEventArgs

The event data that describes the property that changed, as well as old and new values.

ToString()

Returns the string representation of this object.

public override string ToString()

Returns

string:

The string representation of this object.

Fields

ContentPlacementProperty

Defines the ContentPlacement property.

public static readonly DependencyProperty ContentPlacementProperty

IndexProperty

Defines the Index property.

public static readonly DependencyProperty IndexProperty

IsActiveProperty

Defines the IsActive property.

public static readonly DependencyProperty IsActiveProperty

IsContentVisibleProperty

Defines the IsContentVisible property.

public static readonly DependencyProperty IsContentVisibleProperty

IsTrackDecorationVisibleProperty

Defines the IsTrackDecorationVisible property.

public static readonly DependencyProperty IsTrackDecorationVisibleProperty

OrientationProperty

Defines the Orientation property.

public static readonly DependencyProperty OrientationProperty

SnapDistanceProperty

Defines the SnapDistance property.

public static readonly DependencyProperty SnapDistanceProperty

ValueContentConverterProperty

Defines the ValueContentConverter property.

public static readonly DependencyProperty ValueContentConverterProperty

ValueFormatProperty

Defines the ValueFormat property.

public static readonly DependencyProperty ValueFormatProperty

ValueProperty

Defines the Value property.

public static readonly DependencyProperty ValueProperty

Extension Methods