Class DashStyle
Represents the sequence of dashes and gaps that will be applied by a Pen.
public sealed class DashStyle : Animatable, INotifyPropertyChanged, IDashStyle
- Inheritance
-
DashStyle
- Implements
- Inherited Members
- Extension Methods
Constructors
DashStyle()
Initializes a new instance of the DashStyle class.
public DashStyle()
DashStyle(IEnumerable<double>?, double)
Initializes a new instance of the DashStyle class.
public DashStyle(IEnumerable<double>? dashes, double offset)
Parameters
dashes
IEnumerable<double>The dashes collection.
offset
doubleThe dash sequence offset.
Fields
DashesProperty
Defines the Dashes property.
public static readonly StyledProperty<AvaloniaList<double>?> DashesProperty
Field Value
OffsetProperty
Defines the Offset property.
public static readonly StyledProperty<double> OffsetProperty
Field Value
Properties
Dash
Represents a dashed DashStyle.
public static IDashStyle Dash { get; }
Property Value
DashDot
Represents a dashed dotted DashStyle.
public static IDashStyle DashDot { get; }
Property Value
DashDotDot
Represents a dashed double dotted DashStyle.
public static IDashStyle DashDotDot { get; }
Property Value
Dashes
Gets or sets the length of alternating dashes and gaps.
public AvaloniaList<double>? Dashes { get; set; }
Property Value
Dot
Represents a dotted DashStyle.
public static IDashStyle Dot { get; }
Property Value
Offset
Gets or sets how far in the dash sequence the stroke will start.
public double Offset { get; set; }
Property Value
Methods
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.
ToImmutable()
Returns an immutable clone of the DashStyle.
public ImmutableDashStyle ToImmutable()