Class AlternatingStyleStrategy
A style strategy that alternates between two colors.
public class AlternatingStyleStrategy : AvaloniaObject, INotifyPropertyChanged, IStyleStrategy
- Inheritance
-
AvaloniaObjectAlternatingStyleStrategy
- 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.OnPropertyChanged(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>
ForegroundProperty
Defines the Foreground property.
public static readonly StyledProperty<IBrush> ForegroundProperty
Field Value
- StyledProperty<IBrush>
PrimaryBackgroundProperty
Defines the PrimaryBackground property.
public static readonly StyledProperty<IBrush> PrimaryBackgroundProperty
Field Value
- StyledProperty<IBrush>
SecondaryBackgroundProperty
Defines the SecondaryBackground property.
public static readonly StyledProperty<IBrush> SecondaryBackgroundProperty
Field Value
- StyledProperty<IBrush>
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
Foreground
Gets or sets the foreground brush for all items.
public IBrush Foreground { get; set; }
Property Value
- IBrush
PrimaryBackground
Gets or sets the background brush for even-indexed items.
public IBrush PrimaryBackground { get; set; }
Property Value
- IBrush
SecondaryBackground
Gets or sets the background brush for odd-indexed items.
public IBrush SecondaryBackground { get; set; }
Property Value
- IBrush
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.