KnobControl.Avalonia

December 1, 2025 ยท View on GitHub

NuGet downloads

Knob

A customizable Knob control for Avalonia UI framework that provides a circular slider interface. The control supports angular dragging, click-to-position functionality, keyboard navigation, mouse wheel interaction, and tick-based positioning. Perfect for potentiometers, audio controls, settings panels, and any scenario where you need a circular value selection interface.

API

PROPERTY NAMETYPEDESCRIPTION
ValuedoubleInherited from RangeBase - Gets or sets the current value of the knob
MinimumdoubleInherited from RangeBase - Gets or sets the minimum allowed value
MaximumdoubleInherited from RangeBase - Gets or sets the maximum allowed value
SmallChangedoubleInherited from RangeBase - Gets or sets the small change increment
LargeChangedoubleInherited from RangeBase - Gets or sets the large change increment
StrokeIBrushInhetited from KnobBase - Gets or sets the brush for shape elements inside Knob base controls.
StartAngledoubleInherited from KnobBase - Gets or sets the start angle in degrees for the knob's sweep range (default: -240)
SweepAngledoubleInherited from KnobBase - Gets or sets the sweep angle in degrees that defines the knob's angular range (default: 300)
ArcThicknessdoubleInherited from KnobBase - Gets or sets the thckness of the arc indicator (default: 3.0)
IsHeaderValueVisibleboolInherited from KnobBase - Gets or sets the visibility of the header control (default: true)
HeaderValueTemplateIDataTemplate?Inherited from KnobBase - Gets or sets the data template for the header value display
HeaderValueHorizontalContentAlignmentHorizontalAlignmentInherited from KnobBase - Gets or sets the horizontal alignment of content in the header section (default: Stretch)
HeaderValueVerticalContentAlignmentVerticalAlignmentInherited from KnobBase - Gets or sets the vertical alignment of content in the header section (default: Stretch)
HeaderValuePlacementKnobHeaderPlacementInherited from KnobBase - Gets or sets the placement of the header control (default: Bottom)
IsPointerVisibleboolGets or sets whether the pointer indicator is visible (default: true)
PointerThicknessdoubleGets or sets the thickness of the pointer indicator (default: 3.0)
PointerSizedoubleGets or sets the size of the pointer indicator (default: 10.0)
TickFrequencydoubleGets or sets the interval between tick marks for value snapping
TicksAvaloniaList<double>?Gets or sets a collection of custom tick values for precise positioning
MinMaxTicksSizedoubleGets or sets the size of the minimum and maximum ticks (default: 8.0)
TicksSizedoubleGets or sets the size of the ticks (default: 4.0)
TicksThicknessdoubleGets or sets the thicknes of the ticks (default: 1.0)
IsSnapToTickEnabledboolGets or sets whether the knob automatically snaps to the closest tick mark

Demo

KnobEndless

KnobEndless is an extension of the original Knob that introduces endless behavior. Perfect for encoders or controls like oscilloscope knobs without stoppers.

API

PROPERTY NAMETYPEDESCRIPTION
ValuedoubleInherited from RangeBase - Gets or sets the current value of the knob
MinimumdoubleInherited from RangeBase - Gets or sets the minimum allowed value
MaximumdoubleInherited from RangeBase - Gets or sets the maximum allowed value
SmallChangedoubleInherited from RangeBase - Gets or sets the small change increment
LargeChangedoubleInherited from RangeBase - Gets or sets the large change increment
StrokeIBrushInhetited from KnobBase - Gets or sets the brush for shape elements inside Knob base controls.
StartAngledoubleInherited from KnobBase - Gets or sets the start angle in degrees for the knob's sweep range (default: -240)
SweepAngledoubleInherited from KnobBase - Gets or sets the sweep angle in degrees that defines the knob's angular range (default: 300)
ArcThicknessdoubleInherited from KnobBase - Gets or sets the thckness of the arc indicator (default: 3.0)
IsHeaderValueVisibleboolInherited from KnobBase - Gets or sets the visibility of the header control (default: true)
HeaderValueTemplateIDataTemplate?Inherited from KnobBase - Gets or sets the data template for the header value display
HeaderValueHorizontalContentAlignmentHorizontalAlignmentInherited from KnobBase - Gets or sets the horizontal alignment of content in the header section (default: Stretch)
HeaderValueVerticalContentAlignmentVerticalAlignmentInherited from KnobBase - Gets or sets the vertical alignment of content in the header section (default: Stretch)
HeaderValuePlacementKnobHeaderPlacementInherited from KnobBase - Gets or sets the placement of the header control (default: Bottom)
ArrowSizedoubleGets or sets the arrow size. (default: 10.0)
GripsDashAvaloniaList<double>Gets or sets the dash list of the grips (default: null)
GripsThicknessdoubleGets or sets the thickness of the grips (default: 3.0)

Demo