GradientFillBrush Class
Represents a fill with a smooth gradual transition of colors at the specified locations that either follows a line or a path.
public sealed class GradientFillBrush : Brush
Public NotInheritable Class GradientFillBrush
Inherits Brush
- Inheritance:
- System.ObjectGradientFillBrush
Properties
Angle
Specifies the direction of color change for the gradient.
Property Value
- System.Double
The direction of the color change for the gradient, expressed as a value between 0 and 1.
Remarks
This property is applicable only when GradientType is Linear.
FillRectangle
Gets or sets the rectangle defining the fill area for the gradient.
public RelativeRectangle FillRectangle { get; set; }
Public Property FillRectangle As RelativeRectangle
Property Value
A RelativeRectangle that defines the fill area.
Remarks
This property is not applicable when GradientType is Linear.
GradientType
Gets or sets the type of the fill gradient.
public GradientFillType GradientType { get; set; }
Public Property GradientType As GradientFillType
Property Value
The type of the fill gradient.
Remarks
RotateWithShape
Gets or sets a value indicating whether the fill should rotate with the shape.
Property Value
- System.Boolean
true if fill should rotate with the shape; otherwise, false.
Remarks
If set to true and a shape that has been filled with a gradient is transformed with a rotation, then the fill will be transformed with the same rotation.
Scaled
Specifies whether the gradient angle scales with the fill region.
Property Value
- System.Boolean
true if the gradient angle scales with the fill region, false otherwise.
Remarks
This property is applicable only when GradientType is Linear.
Stops
Gets the collection of gradient stops in this fill format.
public GradientStopCollection Stops { get; }
Public ReadOnly Property Stops As GradientStopCollection
Property Value
The collection of gradient stops in this fill format
TileRectangle
Gets or sets the rectangle defining the tile area for repeating gradient patterns.
public RelativeRectangle TileRectangle { get; set; }
Public Property TileRectangle As RelativeRectangle
Property Value
A RelativeRectangle that defines the tile area.
Remarks
This property is not applicable when GradientType is Linear.
Inherited Properties
IsEmpty | Gets a value indicating whether the parent element is filled. (Inherited from Brush) |
Inherited Methods
SetDefault() | Sets a default fill on the parent element (element will be filled based on the default settings). (Inherited from Brush) |
SetEmpty() | Sets an empty fill on the parent element (element won't be filled). (Inherited from Brush) |
SetGradient(GradientFillType) | Sets a gradient fill on the parent element. (Inherited from Brush) |
SetPattern(PatternFillType, Color, Color) | Sets a pattern fill on the parent element. (Inherited from Brush) |
SetSolid(Color) | Sets a solid color fill on the parent element. (Inherited from Brush) |
SetSolid(Color, System.Byte) | Sets a solid color fill on the parent element. (Inherited from Brush) |
ToString() | Returns a System.String that represents this Brush instance. (Inherited from Brush) |