LinearGradientBrush 构造函数

定义

初始化 LinearGradientBrush 类的新实例。

重载

名称 说明
LinearGradientBrush()

初始化 LinearGradientBrush 类的新实例。

LinearGradientBrush(GradientStopCollection)

初始化具有指定渐变停止点的 LinearGradientBrush 类的新实例。

LinearGradientBrush(GradientStopCollection, Double)

初始化具有指定LinearGradientBrush和角度的GradientStopCollection类的新实例。

LinearGradientBrush(Color, Color, Double)

初始化具有指定开始LinearGradientBrush、结束Color和角度的类的新实例Color

LinearGradientBrush(GradientStopCollection, Point, Point)

初始化具有指定渐变停止点的类的新实例 LinearGradientBrushStartPoint以及 EndPoint

LinearGradientBrush(Color, Color, Point, Point)

初始化具有指定开始LinearGradientBrush、结束ColorColorStartPoint的类的新实例EndPoint

注解

MappingMode 笔的初始化为 RelativeToBoundingBox

LinearGradientBrush()

初始化 LinearGradientBrush 类的新实例。

public:
 LinearGradientBrush();
public LinearGradientBrush();
Public Sub New ()

注解

MappingMode 笔的初始化为 RelativeToBoundingBox

适用于

LinearGradientBrush(GradientStopCollection)

初始化具有指定渐变停止点的 LinearGradientBrush 类的新实例。

public:
 LinearGradientBrush(System::Windows::Media::GradientStopCollection ^ gradientStopCollection);
public LinearGradientBrush(System.Windows.Media.GradientStopCollection gradientStopCollection);
new System.Windows.Media.LinearGradientBrush : System.Windows.Media.GradientStopCollection -> System.Windows.Media.LinearGradientBrush
Public Sub New (gradientStopCollection As GradientStopCollection)

参数

gradientStopCollection
GradientStopCollection

GradientStops 在此画笔上设置。

注解

MappingMode 笔的初始化为 RelativeToBoundingBox

另请参阅

适用于

LinearGradientBrush(GradientStopCollection, Double)

初始化具有指定LinearGradientBrush和角度的GradientStopCollection类的新实例。

public:
 LinearGradientBrush(System::Windows::Media::GradientStopCollection ^ gradientStopCollection, double angle);
public LinearGradientBrush(System.Windows.Media.GradientStopCollection gradientStopCollection, double angle);
new System.Windows.Media.LinearGradientBrush : System.Windows.Media.GradientStopCollection * double -> System.Windows.Media.LinearGradientBrush
Public Sub New (gradientStopCollection As GradientStopCollection, angle As Double)

参数

gradientStopCollection
GradientStopCollection

GradientStops 在此画笔上设置。

angle
Double

一个 Double 表示渐变的角度(以度为单位)。 值为 0.0 会创建水平渐变,值 90.0 创建垂直渐变。

注解

MappingMode 笔的初始化为 RelativeToBoundingBox

适用于

LinearGradientBrush(Color, Color, Double)

初始化具有指定开始LinearGradientBrush、结束Color和角度的类的新实例Color

public:
 LinearGradientBrush(System::Windows::Media::Color startColor, System::Windows::Media::Color endColor, double angle);
public LinearGradientBrush(System.Windows.Media.Color startColor, System.Windows.Media.Color endColor, double angle);
new System.Windows.Media.LinearGradientBrush : System.Windows.Media.Color * System.Windows.Media.Color * double -> System.Windows.Media.LinearGradientBrush
Public Sub New (startColor As Color, endColor As Color, angle As Double)

参数

startColor
Color

Color偏移量为 0.0。

endColor
Color

Color偏移量 1.0。

angle
Double

一个 Double 表示渐变的角度(以度为单位)。 值为 0.0 会创建水平渐变,值 90.0 创建垂直渐变。

注解

MappingMode 笔的初始化为 RelativeToBoundingBox

适用于

LinearGradientBrush(GradientStopCollection, Point, Point)

初始化具有指定渐变停止点的类的新实例 LinearGradientBrushStartPoint以及 EndPoint

public:
 LinearGradientBrush(System::Windows::Media::GradientStopCollection ^ gradientStopCollection, System::Windows::Point startPoint, System::Windows::Point endPoint);
public LinearGradientBrush(System.Windows.Media.GradientStopCollection gradientStopCollection, System.Windows.Point startPoint, System.Windows.Point endPoint);
new System.Windows.Media.LinearGradientBrush : System.Windows.Media.GradientStopCollection * System.Windows.Point * System.Windows.Point -> System.Windows.Media.LinearGradientBrush
Public Sub New (gradientStopCollection As GradientStopCollection, startPoint As Point, endPoint As Point)

参数

gradientStopCollection
GradientStopCollection

GradientStops 在此画笔上设置。

startPoint
Point

StartPoint渐变。

endPoint
Point

EndPoint渐变。

注解

MappingMode 笔的初始化为 RelativeToBoundingBox

适用于

LinearGradientBrush(Color, Color, Point, Point)

初始化具有指定开始LinearGradientBrush、结束ColorColorStartPoint的类的新实例EndPoint

public:
 LinearGradientBrush(System::Windows::Media::Color startColor, System::Windows::Media::Color endColor, System::Windows::Point startPoint, System::Windows::Point endPoint);
public LinearGradientBrush(System.Windows.Media.Color startColor, System.Windows.Media.Color endColor, System.Windows.Point startPoint, System.Windows.Point endPoint);
new System.Windows.Media.LinearGradientBrush : System.Windows.Media.Color * System.Windows.Media.Color * System.Windows.Point * System.Windows.Point -> System.Windows.Media.LinearGradientBrush
Public Sub New (startColor As Color, endColor As Color, startPoint As Point, endPoint As Point)

参数

startColor
Color

Color偏移量为 0.0。

endColor
Color

Color偏移量 1.0。

startPoint
Point

StartPoint渐变。

endPoint
Point

EndPoint渐变。

注解

MappingMode 笔的初始化为 RelativeToBoundingBox

适用于