Table of Contents

Class Track

Namespace
Avalonia.Controls.Primitives
Assembly
Avalonia.Controls.dll
[PseudoClasses(new string[] { ":vertical", ":horizontal" })]
public class Track : Control, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
Inheritance
Track
Implements
Inherited Members
Extension Methods

Constructors

Track()

public Track()

Fields

DecreaseButtonProperty

public static readonly StyledProperty<Button?> DecreaseButtonProperty

Field Value

StyledProperty<Button>

DeferThumbDragProperty

public static readonly StyledProperty<bool> DeferThumbDragProperty

Field Value

StyledProperty<bool>

IgnoreThumbDragProperty

public static readonly StyledProperty<bool> IgnoreThumbDragProperty

Field Value

StyledProperty<bool>

IncreaseButtonProperty

public static readonly StyledProperty<Button?> IncreaseButtonProperty

Field Value

StyledProperty<Button>

IsDirectionReversedProperty

public static readonly StyledProperty<bool> IsDirectionReversedProperty

Field Value

StyledProperty<bool>

MaximumProperty

public static readonly StyledProperty<double> MaximumProperty

Field Value

StyledProperty<double>

MinimumProperty

public static readonly StyledProperty<double> MinimumProperty

Field Value

StyledProperty<double>

OrientationProperty

public static readonly StyledProperty<Orientation> OrientationProperty

Field Value

StyledProperty<Orientation>

ThumbProperty

public static readonly StyledProperty<Thumb?> ThumbProperty

Field Value

StyledProperty<Thumb>

ValueProperty

public static readonly StyledProperty<double> ValueProperty

Field Value

StyledProperty<double>

ViewportSizeProperty

public static readonly StyledProperty<double> ViewportSizeProperty

Field Value

StyledProperty<double>

Properties

DecreaseButton

public Button? DecreaseButton { get; set; }

Property Value

Button

DeferThumbDrag

public bool DeferThumbDrag { get; set; }

Property Value

bool

IgnoreThumbDrag

public bool IgnoreThumbDrag { get; set; }

Property Value

bool

IncreaseButton

public Button? IncreaseButton { get; set; }

Property Value

Button

IsDirectionReversed

public bool IsDirectionReversed { get; set; }

Property Value

bool

Maximum

public double Maximum { get; set; }

Property Value

double

Minimum

public double Minimum { get; set; }

Property Value

double

Orientation

public Orientation Orientation { get; set; }

Property Value

Orientation

Thumb

[Content]
public Thumb? Thumb { get; set; }

Property Value

Thumb

Value

public double Value { get; set; }

Property Value

double

ViewportSize

public double ViewportSize { get; set; }

Property Value

double

Methods

ArrangeOverride(Size)

Positions child elements as part of a layout pass.

protected override Size ArrangeOverride(Size arrangeSize)

Parameters

arrangeSize Size

Returns

Size

The actual size used.

MeasureOverride(Size)

Measures the control and its child elements as part of a layout pass.

protected override Size MeasureOverride(Size availableSize)

Parameters

availableSize Size

The size available to the control.

Returns

Size

The desired size for the control.

OnPropertyChanged(AvaloniaPropertyChangedEventArgs)

Called when a avalonia property changes on the object.

protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)

Parameters

change AvaloniaPropertyChangedEventArgs

The property change details.

ValueFromDistance(double, double)

Calculates the change in the Value of the Track when the Thumb moves.

public virtual double ValueFromDistance(double horizontal, double vertical)

Parameters

horizontal double

The horizontal displacement of the thumb.

vertical double

The vertical displacement of the thumb.

Returns

double

ValueFromPoint(Point)

Calculates the distance along the Thumb of a specified point along the track.

public virtual double ValueFromPoint(Point point)

Parameters

point Point

The specified point.

Returns

double

The distance between the Thumb and the specified pt value.