Show / Hide Table of Contents

Class LinearGradientBrush

Paints an area with a linear gradient.

Inheritance
System.Object
DependencyObject
Brush
GradientBrush
LinearGradientBrush
Inherited Members
GradientBrush.GradientStopsProperty
GradientBrush.GradientStops
GradientBrush.MappingModeProperty
GradientBrush.MappingMode
GradientBrush.SpreadMethodProperty
GradientBrush.SpreadMethod
GradientBrush.ColorInterpolationModeProperty
GradientBrush.ColorInterpolationMode
Brush.OpacityProperty
Brush.Opacity
Brush.RelativeTransformProperty
Brush.RelativeTransform
Brush.TransformProperty
Brush.Transform
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.INTERNAL_OnAttachedToVisualTree()
DependencyObject.INTERNAL_OnDetachedFromVisualTree()
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Media
Assembly: OpenSilver.dll
Syntax
public sealed class LinearGradientBrush : GradientBrush, IDependencyObject

Constructors

| Improve this Doc View Source

LinearGradientBrush()

Initializes a new instance of the LinearGradientBrush class.

Declaration
public LinearGradientBrush()
| Improve this Doc View Source

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 Source

EndPointProperty

Identifies the EndPoint dependency property.

Declaration
public static readonly DependencyProperty EndPointProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

StartPointProperty

Identifies the StartPoint dependency property.

Declaration
public static readonly DependencyProperty StartPointProperty
Field Value
Type Description
DependencyProperty

Properties

| Improve this Doc View Source

EndPoint

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.

| Improve this Doc View Source

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.

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
  • Improve this Doc
  • View Source