Class GradientStyleStrategy
A style strategy that creates a smooth color gradient across items.
public class GradientStyleStrategy : AvaloniaObject, INotifyPropertyChanged, IStyleStrategy
- Inheritance
-
AvaloniaObjectGradientStyleStrategy
- Implements
- Inherited Members
-
AvaloniaObject.CheckAccess()AvaloniaObject.VerifyAccess()AvaloniaObject.ClearValue(AvaloniaProperty)AvaloniaObject.ClearValue<T>(AvaloniaProperty<T>)AvaloniaObject.ClearValue<T>(StyledProperty<T>)AvaloniaObject.ClearValue<T>(DirectPropertyBase<T>)AvaloniaObject.GetHashCode()AvaloniaObject.GetValue(AvaloniaProperty)AvaloniaObject.GetValue<T>(StyledProperty<T>)AvaloniaObject.GetValue<T>(DirectPropertyBase<T>)AvaloniaObject.GetBaseValue<T>(StyledProperty<T>)AvaloniaObject.IsAnimating(AvaloniaProperty)AvaloniaObject.IsSet(AvaloniaProperty)AvaloniaObject.SetValue<T>(StyledProperty<T>, T, BindingPriority)AvaloniaObject.SetValue<T>(DirectPropertyBase<T>, T)AvaloniaObject.SetCurrentValue<T>(StyledProperty<T>, T)AvaloniaObject.Bind(AvaloniaProperty, IBinding)AvaloniaObject.CoerceValue(AvaloniaProperty)AvaloniaObject.OnPropertyChangedCore(AvaloniaPropertyChangedEventArgs)AvaloniaObject.RaisePropertyChanged<T>(DirectPropertyBase<T>, T, T)AvaloniaObject.SetAndRaise<T>(DirectPropertyBase<T>, ref T, T)AvaloniaObject.InheritanceParentAvaloniaObject.this[AvaloniaProperty]AvaloniaObject.this[IndexerDescriptor]AvaloniaObject.PropertyChanged
Fields
BorderBrushProperty
Defines the BorderBrush property.
public static readonly StyledProperty<IBrush> BorderBrushProperty
Field Value
- StyledProperty<IBrush>
BorderThicknessProperty
Defines the BorderThickness property.
public static readonly StyledProperty<double> BorderThicknessProperty
Field Value
- StyledProperty<double>
EndColorProperty
Defines the EndColor property.
public static readonly StyledProperty<Color> EndColorProperty
Field Value
- StyledProperty<Color>
ForegroundProperty
Defines the Foreground property.
public static readonly StyledProperty<IBrush> ForegroundProperty
Field Value
- StyledProperty<IBrush>
StartColorProperty
Defines the StartColor property.
public static readonly StyledProperty<Color> StartColorProperty
Field Value
- StyledProperty<Color>
Properties
BorderBrush
Gets or sets the border brush for all items.
public IBrush BorderBrush { get; set; }
Property Value
- IBrush
BorderThickness
Gets or sets the border thickness for all items.
public double BorderThickness { get; set; }
Property Value
EndColor
Gets or sets the ending color of the gradient.
public Color EndColor { get; set; }
Property Value
- Color
Foreground
Gets or sets the foreground brush for all items.
public IBrush Foreground { get; set; }
Property Value
- IBrush
StartColor
Gets or sets the starting color of the gradient.
public Color StartColor { get; set; }
Property Value
- Color
Methods
GetStyle(int, int, FortuneItemStyle?)
Gets the style for an item at a specific index.
public FortuneItemStyle GetStyle(int index, int totalCount, FortuneItemStyle? itemStyle)
Parameters
indexintThe index of the item.
totalCountintThe total number of items.
itemStyleFortuneItemStyleThe item's custom style, if any.
Returns
- FortuneItemStyle
The style to apply to the item.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
changeAvaloniaPropertyChangedEventArgsThe property change details.