LinearGradientBrush Class

Summary

A brush that draws with a linear gradient.
graph TD Base0["GradientBrush"]-->Type click Base0 "/api/Avalonia.Media/GradientBrush" Base1["Brush"]-->Base0 click Base1 "/api/Avalonia.Media/Brush" Base2["Animatable"]-->Base1 click Base2 "/api/Avalonia.Animation/Animatable" Base3["AvaloniaObject"]-->Base2 click Base3 "/api/Avalonia/AvaloniaObject" Base4["object"]-->Base3 Interface0["IAvaloniaObject"]-.->Type click Interface0 "/api/Avalonia/IAvaloniaObject" Interface1["IAvaloniaObjectDebug"]-.->Type click Interface1 "/api/Avalonia.Diagnostics/IAvaloniaObjectDebug" Interface2["INotifyPropertyChanged"]-.->Type Interface3["IMutableBrush"]-.->Type click Interface3 "/api/Avalonia.Media/IMutableBrush" Interface4["IAffectsRender"]-.->Type click Interface4 "/api/Avalonia.Media/IAffectsRender" Interface5["ILinearGradientBrush"]-.->Type click Interface5 "/api/Avalonia.Media/ILinearGradientBrush" Interface6["IGradientBrush"]-.->Type click Interface6 "/api/Avalonia.Media/IGradientBrush" Interface7["IBrush"]-.->Type click Interface7 "/api/Avalonia.Media/IBrush" Type["LinearGradientBrush"] class Type type-node

Syntax

public sealed class LinearGradientBrush : GradientBrush, IAvaloniaObject, IAvaloniaObjectDebug, 
    INotifyPropertyChanged, IMutableBrush, IAffectsRender, ILinearGradientBrush, IGradientBrush, 
    IBrush

Events

Name Type Summary
Invalidated EventHandler
Raised when the resource changes visually.
Inherited from Brush
PropertyChanged EventHandler<AvaloniaPropertyChangedEventArgs>
Raised when a AvaloniaProperty value changes on this object.
Inherited from AvaloniaObject

Fields

Name Constant Value Summary
ClockProperty
Inherited from Animatable
static
EndPointProperty
Defines the EndPoint property.
static
GradientStopsProperty
Defines the GradientStops property.
Inherited from GradientBrush
static
OpacityProperty
Defines the Opacity property.
Inherited from Brush
static
SpreadMethodProperty
Defines the SpreadMethod property.
Inherited from GradientBrush
static
StartPointProperty
Defines the StartPoint property.
static
TransitionsProperty
Defines the Transitions property.
Inherited from Animatable
static

Properties

Name Value Summary
Clock IClock
Inherited from Animatable
EndPoint RelativePoint
Gets or sets the end point for the gradient.
GradientStops GradientStops
Inherited from GradientBrush
InheritanceParent IAvaloniaObject
Gets or sets the parent object that inherited AvaloniaProperty values are inherited from.
Inherited from AvaloniaObject
Opacity double
Gets or sets the opacity of the brush.
Inherited from Brush
SpreadMethod GradientSpreadMethod
Gets the brush's spread method that defines how to draw a gradient that doesn't fill the bounds of the destination control.
Inherited from GradientBrush
StartPoint RelativePoint
Gets or sets the start point for the gradient.
this[AvaloniaProperty] object
Gets or sets the value of a AvaloniaProperty.
Inherited from AvaloniaObject
this[IndexerDescriptor] IBinding
Gets or sets a binding for a AvaloniaProperty.
Inherited from AvaloniaObject
Transitions Transitions
Gets or sets the property transitions for the control.
Inherited from Animatable

Methods

Name Value Summary
AffectsRender<T>(AvaloniaProperty[]) void
Marks a property as affecting the brush's visual representation.
Inherited from Brush
static
AffectsValidation(AvaloniaProperty, AvaloniaProperty[]) void
Forces revalidation of properties when a property value changes.
Inherited from AvaloniaObject
static
Bind(AvaloniaProperty, IObservable<object>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
Inherited from AvaloniaObject
Bind<T>(AvaloniaProperty<T>, IObservable<T>, BindingPriority) IDisposable
Binds a AvaloniaProperty to an observable.
Inherited from AvaloniaObject
CheckAccess() bool
Inherited from AvaloniaObject
ClearValue(AvaloniaProperty) void
Clears a AvaloniaProperty's local value.
Inherited from AvaloniaObject
Equals(object) bool
Compares two objects using reference equality.
Inherited from AvaloniaObject
GetHashCode() int
Gets the hash code for the object.
Inherited from AvaloniaObject
GetValue(AvaloniaProperty) object
Gets a AvaloniaProperty value.
Inherited from AvaloniaObject
GetValue<T>(AvaloniaProperty<T>) T
Gets a AvaloniaProperty value.
Inherited from AvaloniaObject
IsAnimating(AvaloniaProperty) bool
Checks whether a AvaloniaProperty is animating.
Inherited from AvaloniaObject
IsSet(AvaloniaProperty) bool
Checks whether a AvaloniaProperty is set on this object.
Inherited from AvaloniaObject
OnPropertyChanged(AvaloniaPropertyChangedEventArgs) void
Reacts to a change in a AvaloniaProperty value in order to animate the change if a ITransition is set for the property.
Inherited from Animatable
Parse(string) IBrush
Parses a brush string.
Inherited from Brush
static
RaiseInvalidated(EventArgs) void
Raises the Invalidated event.
Inherited from Brush
Revalidate(AvaloniaProperty) void
Forces the specified property to be revalidated.
Inherited from AvaloniaObject
SetAndRaise<T>(AvaloniaProperty<T>, T, T) bool
Sets the backing field for a direct avalonia property, raising the PropertyChanged event if the value has changed.
Inherited from AvaloniaObject
SetValue(AvaloniaProperty, object, BindingPriority) void
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
SetValue<T>(AvaloniaProperty<T>, T, BindingPriority) void
Sets a AvaloniaProperty value.
Inherited from AvaloniaObject
ToImmutable() IBrush
Creates an immutable clone of the brush.
UpdateDataValidation(AvaloniaProperty, BindingNotification) void
Called to update the validation state for properties for which data validation is enabled.
Inherited from AvaloniaObject
VerifyAccess() void
Inherited from AvaloniaObject

Extension Methods