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
Inherited Members
Namespace: System.Windows.Media
Assembly: OpenSilver.dll
Syntax
public class GradientBrush : Brush, IDependencyObject
Constructors
| Improve this Doc View SourceGradientBrush()
Initializes a new instance of the GradientBrush class.
Declaration
protected GradientBrush()
Fields
| Improve this Doc View SourceColorInterpolationModeProperty
Identifies the ColorInterpolationMode dependency property.
Declaration
[NotImplemented]
public static readonly DependencyProperty ColorInterpolationModeProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
GradientStopsProperty
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 SourceColorInterpolationMode
Gets or sets a ColorInterpolationMode enumeration value that specifies how the gradient's colors are interpolated.
Declaration
[NotImplemented]
public ColorInterpolationMode ColorInterpolationMode { get; set; }
Property Value
Type | Description |
---|---|
ColorInterpolationMode | Specifies how the colors in a gradient are interpolated. The default is SRgbLinearInterpolation. |
GradientStops
Gets or sets the brush's gradient stops.
Declaration
public GradientStopCollection GradientStops { get; set; }
Property Value
Type | Description |
---|---|
GradientStopCollection | 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. |
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 | A BrushMappingMode value that specifies how to interpret the gradient brush's positioning coordinates. The default is RelativeToBoundingBox. |
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.
Declaration
public GradientSpreadMethod SpreadMethod { get; set; }
Property Value
Type | Description |
---|---|
GradientSpreadMethod | The type of spread method used to paint the gradient. The default is Pad. |