ToolStrip::ImageScalingSize Property

 

Gets or sets the size, in pixels, of an image used on a ToolStrip.

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

public:
property Size ImageScalingSize {
	Size get();
	void set(Size value);
}

Property Value

Type: System.Drawing::Size

A Size value representing the size of the image, in pixels. The default is 16 x 16 pixels.

Use the ToolStripItemImageScaling property to control the default size of an image. Use SizeToFit to make the size of the image on a ToolStripItem to automatically adjust to fit on a ToolStrip while retaining the original image proportions.

The Image, ImageAlign, ImageIndex, ImageKey, and ImageScaling properties pertain to various aspects of image handling. Use images in ToolStrip controls by setting these properties directly or by setting the run-time–only ImageList property.

Image scaling is determined by the interaction of properties in both ToolStrip and ToolStripItem, as follows:

The following code example demonstrates the syntax for setting common ToolStrip properties, including the ImageScalingSize property.

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

.NET Framework
Available since 2.0
Return to top
Show: