RadialGradientBrush Class

Definition

Caution

Please migrate to the RadialGradientBrush control from WinUI, this control will be removed in a future release. https://aka.ms/winui

RadialGradientBrush - This GradientBrush defines its Gradient as an interpolation within an Ellipse.

[System.Obsolete("Please migrate to the RadialGradientBrush control from WinUI, this control will be removed in a future release. https://aka.ms/winui")]
[Windows.UI.Xaml.Markup.ContentProperty(Name="GradientStops")]
public class RadialGradientBrush : Microsoft.Toolkit.Uwp.UI.Media.CanvasBrushBase
[<System.Obsolete("Please migrate to the RadialGradientBrush control from WinUI, this control will be removed in a future release. https://aka.ms/winui")>]
[<Windows.UI.Xaml.Markup.ContentProperty(Name="GradientStops")>]
type RadialGradientBrush = class
    inherit CanvasBrushBase
Public Class RadialGradientBrush
Inherits CanvasBrushBase
Inheritance
Windows.UI.Xaml.Media.XamlCompositionBrushBase
RadialGradientBrush
Attributes
ObsoleteAttribute Windows.UI.Xaml.Markup.ContentPropertyAttribute

Constructors

RadialGradientBrush()

Initializes a new instance of the RadialGradientBrush class.

RadialGradientBrush(Color, Color)

Initializes a new instance of the RadialGradientBrush class with two colors specified for GradientStops at offsets 0.0 and 1.0.

RadialGradientBrush(GradientStopCollection)

Initializes a new instance of the RadialGradientBrush class with GradientStops set to the passed-in collection.

Fields

AlphaModeProperty

Identifies the AlphaMode dependency property.

CenterProperty

Identifies the Center dependency property.

ColorInterpolationModeProperty

Identifies the ColorInterpolationMode dependency property.

GradientOriginProperty

Identifies the GradientOrigin dependency property.

GradientStopsProperty

Identifies the GradientStops dependency property.

RadiusXProperty

Identifies the RadiusX dependency property.

RadiusYProperty

Identifies the RadiusX dependency property.

SpreadMethodProperty

Identifies the SpreadMethod dependency property.

Properties

AlphaMode

Gets or sets a AlphaMode enumeration that specifies the way in which an alpha channel affects color channels. The default is Straight for compatibility with WPF.

Center

Gets or sets the center of the outermost circle of the radial gradient. The default is 0.5,0.5.

ColorInterpolationMode

Gets or sets a ColorInterpolationMode enumeration that specifies how the gradient's colors are interpolated. The default is Windows.UI.Xaml.Media.ColorInterpolationMode.SRgbLinearInterpolation.

GradientOrigin

Gets or sets the location of the two-dimensional focal point that defines the beginning of the gradient. The default is 0.5,0.5.

GradientStops

Gets or sets the brush's gradient stops.

RadiusX

Gets or sets the horizontal radius of the outermost circle of the radial gradient. The default is 0.5.

RadiusY

Gets or sets the vertical radius of the outermost circle of the radial gradient. The default is 0.5.

SpreadMethod

Gets or sets the type of spread method that specifies how to draw a gradient that starts or ends inside the bounds of the object to be painted.

SurfaceHeight

Gets or sets the internal surface render height. Modify during construction.

(Inherited from CanvasBrushBase)
SurfaceWidth

Gets or sets the internal surface render width. Modify during construction.

(Inherited from CanvasBrushBase)

Methods

OnConnected()

Initializes the Composition Brush.

(Inherited from CanvasBrushBase)
OnDisconnected()

Deconstructs the Composition Brush.

(Inherited from CanvasBrushBase)
OnDraw(CanvasDevice, CanvasDrawingSession, Vector2)

Implemented by parent class and called when canvas is being constructed for brush.

Applies to