WrapMode Enumeration

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Specifies how a texture or gradient is tiled when it is smaller than the area being filled.

Namespace:   System.Drawing.Drawing2D
Assembly:  System.Drawing (in System.Drawing.dll)

type WrapMode

Member nameDescription
Clamp

The texture or gradient is not tiled.

Tile

Tiles the gradient or texture.

TileFlipX

Reverses the texture or gradient horizontally and then tiles the texture or gradient.

TileFlipXY

Reverses the texture or gradient horizontally and vertically and then tiles the texture or gradient.

TileFlipY

Reverses the texture or gradient vertically and then tiles the texture or gradient.

Brushes use this enumeration to determine how shapes are filled. To see examples of the effects the WrapMode enumeration values have on a tiled image, see How to: Tile a Shape with an Image.

The following code example demonstrates how to obtain a new bitmap using the FromFile method. It also demonstrates a TextureBrush and the WrapMode enumeration. This example is designed to be used with Windows Forms. Create a form containing a button named Button2. Paste the code into the form and associate the Button2_Click method with the button's Click event.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: