GradientBrush
GradientBrush
GradientBrush
GradientBrush
Class
Definition
An abstract class that describes a gradient, composed of gradient stops. Parent class for LinearGradientBrush.
public : class GradientBrush : Brush, IGradientBrushpublic class GradientBrush : Brush, IGradientBrushPublic Class GradientBrush Inherits Brush Implements IGradientBrush// This API is not available in Javascript.
- Inheritance
-
GradientBrushGradientBrushGradientBrushGradientBrush
- Attributes
| Device family |
Windows 10 (introduced v10.0.10240.0)
|
| API contract |
Windows.Foundation.UniversalApiContract (introduced v1)
|
Inherited Members
Inherited methods
Inherited properties
Remarks
You describe the color composition of a LinearGradientBrush using the GradientStops property. Each GradientStop therein expresses a Color and an Offset. Offset values should be between 0 and 1. Color values can be any value expressed as a named color or one of the conversion syntaxes; see notes in GradientStop.Color, particularly the XAML syntax.
GradientBrush derived classes
GradientBrush is the parent class for LinearGradientBrush. The Windows Runtime XAML vocabulary doesn't support RadialGradientBrush.
Constructors
GradientBrush() GradientBrush() GradientBrush() GradientBrush()
Provides base class initialization behavior for GradientBrush -derived classes.
protected : GradientBrush()protected GradientBrush()Protected Sub New()// This API is not available in Javascript.
Properties
ColorInterpolationMode ColorInterpolationMode ColorInterpolationMode ColorInterpolationMode
Gets or sets a ColorInterpolationMode enumeration value that specifies how the gradient's colors are interpolated.
public : ColorInterpolationMode ColorInterpolationMode { get; set; }public ColorInterpolationMode ColorInterpolationMode { get; set; }Public ReadWrite Property ColorInterpolationMode As ColorInterpolationMode// This API is not available in Javascript.
<gradientBrush ColorInterpolationMode="colorInterpolationModeMemberName"/>
Specifies how the colors in a gradient are interpolated. The default is SRgbLinearInterpolation.
ColorInterpolationModeProperty ColorInterpolationModeProperty ColorInterpolationModeProperty ColorInterpolationModeProperty
Identifies the ColorInterpolationMode dependency property.
public : static DependencyProperty ColorInterpolationModeProperty { get; }public static DependencyProperty ColorInterpolationModeProperty { get; }Public Static ReadOnly Property ColorInterpolationModeProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the ColorInterpolationMode dependency property.
GradientStops GradientStops GradientStops GradientStops
Gets or sets the brush's gradient stops.
public : GradientStopCollection GradientStops { get; set; }public GradientStopCollection GradientStops { get; set; }Public ReadWrite Property GradientStops As GradientStopCollection// This API is not available in Javascript.
<gradientBrush>
oneOrMoreGradientStops
</gradientBrush>
A collection of the GradientStop objects associated with the brush, each of which specifies a color and an offset along the brush's gradient axis. The default is an empty GradientStopCollection.
GradientStopsProperty GradientStopsProperty GradientStopsProperty GradientStopsProperty
Identifies the GradientStops dependency property.
public : static DependencyProperty GradientStopsProperty { get; }public static DependencyProperty GradientStopsProperty { get; }Public Static ReadOnly Property GradientStopsProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the GradientStops dependency property.
MappingMode MappingMode MappingMode MappingMode
Gets or sets a BrushMappingMode enumeration value that specifies whether the positioning coordinates of the gradient brush are absolute or relative to the output area.
public : BrushMappingMode MappingMode { get; set; }public BrushMappingMode MappingMode { get; set; }Public ReadWrite Property MappingMode As BrushMappingMode// This API is not available in Javascript.
<gradientBrush MappingMode="Absolute"/>
-or-
<gradientBrush MappingMode="RelativeToBoundingBox"/>
A BrushMappingMode value that specifies how to interpret the gradient brush's positioning coordinates. The default is RelativeToBoundingBox.
MappingModeProperty MappingModeProperty MappingModeProperty MappingModeProperty
Identifies the MappingMode dependency property.
public : static DependencyProperty MappingModeProperty { get; }public static DependencyProperty MappingModeProperty { get; }Public Static ReadOnly Property MappingModeProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the MappingMode dependency property.
SpreadMethod SpreadMethod SpreadMethod 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.
public : GradientSpreadMethod SpreadMethod { get; set; }public GradientSpreadMethod SpreadMethod { get; set; }Public ReadWrite Property SpreadMethod As GradientSpreadMethod// This API is not available in Javascript.
<gradientBrush SpreadMethod="Pad"/>
-or-
<gradientBrush SpreadMethod="Reflect"/>
-or-
<gradientBrush SpreadMethod="Repeat"/>
The type of spread method used to paint the gradient. The default is Pad.
SpreadMethodProperty SpreadMethodProperty SpreadMethodProperty SpreadMethodProperty
Identifies the SpreadMethod dependency property.
public : static DependencyProperty SpreadMethodProperty { get; }public static DependencyProperty SpreadMethodProperty { get; }Public Static ReadOnly Property SpreadMethodProperty As DependencyProperty// This API is not available in Javascript.
The identifier for the SpreadMethod dependency property.