Table of Contents

Class SkiaRangeBase

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll

Base class for range-based controls like sliders and progress bars. Provides common functionality for value ranges, track management, and platform styling.

public abstract class SkiaRangeBase : SkiaLayout, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IVisualElementController, IElementController, IView, ITransform, IElement, IVisualTreeElement, IContainer, IList<IView>, ICollection<IView>, IEnumerable<IView>, IEnumerable, ISkiaGestureListener, IHasAfterEffects, ISkiaDisposable, ISkiaGridLayout, ISkiaLayout, ISkiaControl, IDrawnBase, ICanBeUpdatedWithContext, ICanBeUpdated, ILayoutInsideViewport, IInsideViewport, IVisibilityAware, IDisposable
Inheritance
SkiaRangeBase
Implements
Derived
Inherited Members
Extension Methods

Fields

MaxProperty

public static readonly BindableProperty MaxProperty

Field Value

BindableProperty

MinProperty

public static readonly BindableProperty MinProperty

Field Value

BindableProperty

ProgressColorProperty

public static readonly BindableProperty ProgressColorProperty

Field Value

BindableProperty

ProgressTrail

protected SkiaControl ProgressTrail

Field Value

SkiaControl

StepProperty

public static readonly BindableProperty StepProperty

Field Value

BindableProperty

Track

protected SkiaControl Track

Field Value

SkiaControl

TrackColorProperty

public static readonly BindableProperty TrackColorProperty

Field Value

BindableProperty

TrackHeightProperty

public static readonly BindableProperty TrackHeightProperty

Field Value

BindableProperty

ValueProperty

public static readonly BindableProperty ValueProperty

Field Value

BindableProperty

lockInternal

protected volatile bool lockInternal

Field Value

bool

Properties

Max

public double Max { get; set; }

Property Value

double

Min

public double Min { get; set; }

Property Value

double

ProgressColor

The color of the progress/selected portion

public Color ProgressColor { get; set; }

Property Value

Color

Step

public double Step { get; set; }

Property Value

double

TrackColor

The color of the background track

public Color TrackColor { get; set; }

Property Value

Color

TrackHeight

The height of the track

public double TrackHeight { get; set; }

Property Value

double

Value

The current value of the range control

public double Value { get; set; }

Property Value

double

Methods

AdjustToStepValue(double, double, double)

protected double AdjustToStepValue(double value, double minValue, double stepValue)

Parameters

value double
minValue double
stepValue double

Returns

double

FindViews()

Override to find and assign Track and ProgressTrail references

protected abstract void FindViews()

OnChildrenChanged()

Happens when child was added or removed, will call Invalidate() in base

public override void OnChildrenChanged()

OnDisposing()

Base performs some cleanup actions with Superview

public override void OnDisposing()

OnLayoutChanged()

DrawingRect size changed

protected override void OnLayoutChanged()

OnPropertyChanged(string)

Method that is called when a bound property is changed.

protected override void OnPropertyChanged(string propertyName = null)

Parameters

propertyName string

The name of the bound property that changed.

OnValueChanged()

protected virtual void OnValueChanged()

PositionFromValue(double, double)

protected virtual double PositionFromValue(double value, double totalLength)

Parameters

value double
totalLength double

Returns

double

UpdateVisualState()

Override to update the visual appearance based on current properties

protected abstract void UpdateVisualState()

ValueFromPosition(double, double)

protected virtual double ValueFromPosition(double position, double totalLength)

Parameters

position double
totalLength double

Returns

double

Events

ValueChanged

public event EventHandler<double> ValueChanged

Event Type

EventHandler<double>