ToolStripItem::ContentRectangle Property
.NET Framework (current version)
Gets the area where content, such as text and icons, can be placed within a ToolStripItem without overwriting background borders.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
public: [BrowsableAttribute(false)] property Rectangle ContentRectangle { Rectangle get(); }
Property Value
Type: System.Drawing::RectangleA 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.
.NET Framework
Available since 2.0
Available since 2.0
Show: