Class LinearGradientBrush
Paints an area with a linear gradient.
Inherited Members
Namespace: System.Windows.Media
Assembly: OpenSilver.dll
Syntax
public sealed class LinearGradientBrush : GradientBrush, IDependencyObject
Constructors
| Improve this Doc View SourceLinearGradientBrush()
Initializes a new instance of the LinearGradientBrush class.
Declaration
public LinearGradientBrush()
LinearGradientBrush(GradientStopCollection, Double)
Initializes a new instance of the LinearGradientBrush class that has the specified GradientStopCollection and angle.
Declaration
public LinearGradientBrush(GradientStopCollection gradientStopCollection, double angle)
Parameters
Type | Name | Description |
---|---|---|
GradientStopCollection | gradientStopCollection | The GradientStops to set on this brush. |
System.Double | angle | A System.Double that represents the angle, in degrees, of the gradient. A value of 0 creates a horizontal gradient, and a value of 90 creates a vertical gradient. Negative values are permitted, as are values over 360 (are treated as mod 360). |
Fields
| Improve this Doc View SourceEndPointProperty
Identifies the EndPoint dependency property.
Declaration
public static readonly DependencyProperty EndPointProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
StartPointProperty
Identifies the StartPoint dependency property.
Declaration
public static readonly DependencyProperty StartPointProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceEndPoint
Gets or sets the ending two-dimensional coordinates of the linear gradient.
Declaration
public Point EndPoint { get; set; }
Property Value
Type | Description |
---|---|
Point | The ending two-dimensional coordinates of the linear gradient. The default is a Point with value 1,1. |
StartPoint
Gets or sets the starting two-dimensional coordinates of the linear gradient.
Declaration
public Point StartPoint { get; set; }
Property Value
Type | Description |
---|---|
Point | The starting two-dimensional coordinates for the linear gradient. The default is a Point with value 0,0. |