Control.BackgroundImageLayout Property

 
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.

Gets or sets the background image layout as defined in the ImageLayout enumeration.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

public virtual ImageLayout BackgroundImageLayout { get; set; }

Property Value

Type: System.Windows.Forms.ImageLayout

One of the values of ImageLayout (Center , None, Stretch, Tile, or Zoom). Tile is the default value.

Exception Condition
InvalidEnumArgumentException

The specified enumeration value does not exist.

Use the BackgroundImageLayout property to specify the position and behavior of an image you have placed onto a control. BackgroundImageLayout takes effect only if the BackgroundImage property is set.

You can increase performance for large images if you set BackgroundImageLayout to something other than Tile.

.NET Framework
Available since 2.0
Return to top
Show: