This documentation is archived and is not being maintained.

GradientSpreadMethod Enumeration

Specifies how to draw the gradient outside a gradient brush's gradient vector or space.

Namespace: System.Windows.Media
Assembly: PresentationCore (in presentationcore.dll)
XML Namespace:

Public Enumeration GradientSpreadMethod
Dim instance As GradientSpreadMethod

public enum GradientSpreadMethod
public enum GradientSpreadMethod
<object property="EnumerationValue" .../>

 Member nameDescription
PadDefault value. The color values at the ends of the gradient vector fill the remaining space.  
ReflectThe gradient is repeated in the reverse direction until the space is filled.  
RepeatThe gradient is repeated in the original direction until the space is filled.  

The following illustration shows the available spread methods and their effect on LinearGradientBrush and RadialGradientBrush. The red line indicates the gradient space. A LinearGradientBrush defines its gradient space with its StartPoint and EndPoint properties. A RadialGradientBrush defines its gradient space with its Center, RadiusX, and RadiusY properties.

Gradient spread methods

Different GradientSpread settings

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0