Paints an area with a linear gradient.
Assembly: PresentationCore (in PresentationCore.dll)
Initializes a new instance of theclass.
|LinearGradientBrush(Color, Color, Double)|
|LinearGradientBrush(Color, Color, Point, Point)|
Initializes a new instance of theclass that has the specified gradient stops.
Initializes a new instance of the GradientStopCollection and angle.class that has the specified
|LinearGradientBrush(GradientStopCollection, Point, Point)|
Gets a value that indicates whether the object can be made unmodifiable. (Inherited from Freezable.)
Gets or sets the ending two-dimensional coordinates of the linear gradient.
Gets or sets the brush's gradient stops. (Inherited from GradientBrush.)
Gets a value that indicates whether the object is currently modifiable. (Inherited from Freezable.)
Gets a value that indicates whether this instance is currently sealed (read-only).(Inherited from DependencyObject.)
Gets or sets the transformation that is applied to the brush using relative coordinates. (Inherited from Brush.)
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. (Inherited from GradientBrush.)
Gets or sets the starting two-dimensional coordinates of the linear gradient.
Gets or sets the transformation that is applied to the brush. This transformation is applied after the brush's output has been mapped and positioned. (Inherited from Brush.)
The default linear gradient is diagonal. In the default, the StartPoint of a linear gradient is (0,0), the upper-left corner of the area being painted, and its EndPoint is (1,1), the lower-right corner of the area being painted. The colors in the resulting gradient are interpolated along the diagonal path.
The following illustration shows a diagonal gradient. A line was added to highlight the interpolation path of the gradient from the start point to the end point.
The next illustration shows the same linear gradient, but with highlighted gradient stops.
It is possible to specify a gradient axis that does not completely fill area being painted. When this occurs, the SpreadMethod property determines how the remaining area is painted.
Available since 3.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.