Class GradientBrush
An abstract class that describes a gradient, composed of gradient stops. Classes that derive from GradientBrush describe different ways of interpreting gradient stops.
Inheritance
Implements
Inherited Members
Namespace: System.Windows.Media
Assembly: OpenSilver.dll
Syntax
public class GradientBrush : Brush, IHasAccessToPropertiesWhereItIsUsed
Fields
| Improve this Doc View SourceGradientStopsProperty
Identifies the GradientStops dependency property.
Declaration
public static readonly DependencyProperty GradientStopsProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
MappingModeProperty
Identifies the MappingMode dependency property.
Declaration
public static readonly DependencyProperty MappingModeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SpreadMethodProperty
Identifies the SpreadMethod dependency property.
Declaration
public static readonly DependencyProperty SpreadMethodProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceGradientStops
Gets or sets the brush's gradient stops, which is 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.
Declaration
public GradientStopCollection GradientStops { get; set; }
Property Value
Type | Description |
---|---|
GradientStopCollection |
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.
Declaration
public BrushMappingMode MappingMode { get; set; }
Property Value
Type | Description |
---|---|
BrushMappingMode |
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. The default is Pad.
Declaration
public GradientSpreadMethod SpreadMethod { get; set; }
Property Value
Type | Description |
---|---|
GradientSpreadMethod |