Class RadialGradientBrush
Paints an area with a radial gradient.
public sealed class RadialGradientBrush : GradientBrush, INotifyPropertyChanged, IRadialGradientBrush, IGradientBrush, IBrush
- Inheritance
-
RadialGradientBrush
- Implements
- Inherited Members
- Extension Methods
Constructors
RadialGradientBrush()
public RadialGradientBrush()
Fields
CenterProperty
Defines the Center property.
public static readonly StyledProperty<RelativePoint> CenterProperty
Field Value
GradientOriginProperty
Defines the GradientOrigin property.
public static readonly StyledProperty<RelativePoint> GradientOriginProperty
Field Value
RadiusProperty
Defines the Radius property.
[Obsolete("Use RadiusX/RadiusY, note that those properties use _relative_ values, so Radius=0.55 would become RadiusX=55% RadiusY=55%. Radius property is always relative even if the rest of the brush uses absolute values.")]
public static readonly StyledProperty<double> RadiusProperty
Field Value
RadiusXProperty
Defines the RadiusX property.
public static readonly StyledProperty<RelativeScalar> RadiusXProperty
Field Value
RadiusYProperty
Defines the RadiusX property.
public static readonly StyledProperty<RelativeScalar> RadiusYProperty
Field Value
Properties
Center
Gets or sets the start point for the gradient.
public RelativePoint Center { get; set; }
Property Value
GradientOrigin
Gets or sets the location of the two-dimensional focal point that defines the beginning of the gradient.
public RelativePoint GradientOrigin { get; set; }
Property Value
Radius
Gets or sets the horizontal and vertical radius of the outermost circle of the radial gradient.
[Obsolete("Use RadiusX/RadiusY, note that those properties use _relative_ values, so Radius=0.55 would become RadiusX=55% RadiusY=55%. Radius property is always relative even if the rest of the brush uses absolute values.")]
public double Radius { get; set; }
Property Value
RadiusX
Gets or sets the horizontal radius of the outermost circle of the radial gradient.
[DependsOn("Radius")]
public RelativeScalar RadiusX { get; set; }
Property Value
RadiusY
Gets or sets the vertical radius of the outermost circle of the radial gradient.
[DependsOn("Radius")]
public RelativeScalar RadiusY { 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()
Creates an immutable clone of the brush.
public override IImmutableBrush ToImmutable()
Returns
- IImmutableBrush
The immutable clone.