Partager via


RadialGradientBrush.SpreadMethod Propriété

Définition

Obtient ou définit le type de méthode d’engraissement qui indique comment dessiner un dégradé qui commence ou se termine à l’intérieur des limites de l’objet à peindre.

Cette documentation s’applique à WinUI 2 pour UWP (pour WinUI dans le SDK d'application Windows, consultez les espaces de noms SDK d'application Windows).

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; }
Public Property SpreadMethod As GradientSpreadMethod

Valeur de propriété

Type de méthode de propagation qui spécifie comment dessiner un dégradé qui démarre ou se termine à l’intérieur des limites de l’objet à peindre. La valeur par défaut est Pad

Attributs
Microsoft.UI.Xaml.CustomAttributes.MUXPropertyChangedCallbackAttribute Microsoft.UI.Xaml.CustomAttributes.MUXPropertyDefaultValueAttribute

Remarques

L’illustration suivante montre les méthodes de propagation disponibles et leur effet sur LinearGradientBrush et RadialGradientBrush. Par défaut, il s’agit de Pad.

Pad, Reflect et Repeat présentés comme différents paramètres GradientSpread.

S’applique à