Share via


RadialGradientBrush.SpreadMethod Property

Definition

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.

public:
 property GradientSpreadMethod SpreadMethod { GradientSpreadMethod get(); void set(GradientSpreadMethod value); };
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::GradientSpreadMethod::Pad")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::GradientSpreadMethod::Pad")]
GradientSpreadMethod SpreadMethod();

void SpreadMethod(GradientSpreadMethod value);
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::GradientSpreadMethod::Pad")]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [get: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::GradientSpreadMethod::Pad")]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
/// [set: Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::GradientSpreadMethod::Pad")]
GradientSpreadMethod SpreadMethod();

void SpreadMethod(GradientSpreadMethod value);
public GradientSpreadMethod SpreadMethod { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::GradientSpreadMethod::Pad")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::GradientSpreadMethod::Pad")] set; }
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)]
[Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::GradientSpreadMethod::Pad")]
public GradientSpreadMethod SpreadMethod { [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::GradientSpreadMethod::Pad")] get; [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallback(enable=true)] [Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValue(value="winrt::GradientSpreadMethod::Pad")] set; }
var gradientSpreadMethod = radialGradientBrush.spreadMethod;
radialGradientBrush.spreadMethod = gradientSpreadMethod;
Public Property SpreadMethod As GradientSpreadMethod

Property Value

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. The default is Pad

Attributes
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Remarks

The following illustration shows the available spread methods and their effect on LinearGradientBrush and RadialGradientBrush. The default is Pad.

Pad, Reflect, and Repeat demonstrated as different GradientSpread settings.

Applies to