Class TickBar
An element that is used for drawing Slider's Ticks.
public class TickBar : Control, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
TickBar
- Implements
- Inherited Members
- Extension Methods
Constructors
TickBar()
public TickBar()
Fields
FillProperty
Defines the Fill property.
public static readonly StyledProperty<IBrush?> FillProperty
Field Value
IsDirectionReversedProperty
Defines the IsDirectionReversed property.
public static readonly StyledProperty<bool> IsDirectionReversedProperty
Field Value
MaximumProperty
Defines the Maximum property.
public static readonly StyledProperty<double> MaximumProperty
Field Value
MinimumProperty
Defines the Minimum property.
public static readonly StyledProperty<double> MinimumProperty
Field Value
OrientationProperty
Defines the Orientation property.
public static readonly StyledProperty<Orientation> OrientationProperty
Field Value
PlacementProperty
Defines the Placement property.
public static readonly StyledProperty<TickBarPlacement> PlacementProperty
Field Value
ReservedSpaceProperty
Defines the ReservedSpace property.
public static readonly StyledProperty<Rect> ReservedSpaceProperty
Field Value
TickFrequencyProperty
Defines the TickFrequency property.
public static readonly StyledProperty<double> TickFrequencyProperty
Field Value
TicksProperty
Defines the Ticks property.
public static readonly StyledProperty<AvaloniaList<double>?> TicksProperty
Field Value
Properties
Fill
Brush used to fill the TickBar's Ticks.
public IBrush? Fill { get; set; }
Property Value
IsDirectionReversed
The IsDirectionReversed property defines the direction of value incrementation. By default, if Tick's orientation is Horizontal, ticks will be drawn from left to right. (And, bottom to top for Vertical orientation). If IsDirectionReversed is 'true' the direction of the drawing will be in opposite direction.
public bool IsDirectionReversed { get; set; }
Property Value
Maximum
Logical position where the Maximum Tick will be drawn
public double Maximum { get; set; }
Property Value
Minimum
Logical position where the Minimum Tick will be drawn
public double Minimum { get; set; }
Property Value
Orientation
TickBar parent's orientation.
public Orientation Orientation { get; set; }
Property Value
Placement
Placement property specified how the Tick will be placed. This property affects the way ticks are drawn. This property has type of TickBarPlacement.
public TickBarPlacement Placement { get; set; }
Property Value
ReservedSpace
TickBar will use ReservedSpaceProperty for left and right spacing (for horizontal orientation) or top and bottom spacing (for vertical orientation). The space on both sides of TickBar is half of specified ReservedSpace. This property has type of Rect.
public Rect ReservedSpace { get; set; }
Property Value
TickFrequency
TickFrequency property defines how the tick will be drawn.
public double TickFrequency { get; set; }
Property Value
Ticks
The Ticks property contains collection of value of type Double which are the logical positions use to draw the ticks. The property value is a AvaloniaList<T>.
public AvaloniaList<double>? Ticks { get; set; }
Property Value
Methods
Render(DrawingContext)
Draw ticks. Ticks can be draw in 8 different ways depends on Placement property and IsDirectionReversed property.
This function also draw selection-tick(s) if IsSelectionRangeEnabled is 'true' and SelectionStart and SelectionEnd are valid.
The primary ticks (for Minimum and Maximum value) height will be 100% of TickBar's render size (use Width or Height depends on Placement property).
The secondary ticks (all other ticks, including selection-tics) height will be 75% of TickBar's render size.
Brush that use to fill ticks is specified by Fill property.
public override sealed void Render(DrawingContext dc)