This documentation is archived and is not being maintained.

ImageAttributes.SetWrapMode Method (WrapMode, Color, Boolean)

Sets the wrap mode and color used to decide how to tile a texture across a shape, or at shape boundaries. A texture is tiled across a shape to fill it in when the texture is smaller than the shape it is filling.

Namespace: System.Drawing.Imaging
Assembly: System.Drawing (in system.drawing.dll)

public void SetWrapMode (
	WrapMode mode,
	Color color,
	bool clamp
public void SetWrapMode (
	WrapMode mode, 
	Color color, 
	boolean clamp
public function SetWrapMode (
	mode : WrapMode, 
	color : Color, 
	clamp : boolean
Not applicable.



An element of WrapMode that specifies how repeated copies of an image are used to tile an area.


A color object that specifies the color of pixels outside of a rendered image. This color is visible if the mode parameter is set to Clamp and the source rectangle passed to DrawImage is larger than the image itself.


This parameter has no effect. Set it to false.

Return Value

This method does not return a value.

For a code example, see the SetWrapMode(WrapMode) method.

Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, 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, 2.0, 1.1, 1.0