ToolStripItem::ContentRectangle Property

 

Gets the area where content, such as text and icons, can be placed within a ToolStripItem without overwriting background borders.

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

public:
[BrowsableAttribute(false)]
property Rectangle ContentRectangle {
	Rectangle get();
}

Property Value

Type: System.Drawing::Rectangle

A Rectangle containing four integers that represent the location and size of ToolStripItem contents, excluding its border.

Use the ContentRectangle property to do custom painting of a ToolStripItem.

The following code example demonstrates how to use the ContentRectangle property for custom rendering. This code example is part of a larger example provided for the ToolStripItem class.

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

.NET Framework
Available since 2.0
Return to top
Show: