Handles the painting functionality for ToolStrip objects.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the offset multiplier for twice the offset along the x-axis.
This API supports the product infrastructure and is not intended to be used directly from your code. Gets or sets the offset multiplier for twice the offset along the y axis.
Occurs when an arrow on a ToolStripItem is rendered.
Occurs when the background for a ToolStripButton is rendered
Occurs when the background for a ToolStripDropDownButton is rendered.
Occurs when the move handle for a ToolStrip is rendered.
Draws the margin between an image and its container.
Occurs when the background for a ToolStripItem is rendered.
Occurs when the image for a selected ToolStripItem is rendered.
Occurs when the image for a ToolStripItem is rendered.
Occurs when the text for a ToolStripItem is rendered.
Occurs when the background for a ToolStripLabel is rendered.
Occurs when the background for a ToolStripMenuItem is rendered.
Occurs when the background for an overflow button is rendered.
Occurs when a ToolStripSeparator is rendered.
Occurs when the background for a ToolStripSplitButton is rendered.
Occurs when the display style changes.
Occurs when the background for a ToolStrip is rendered.
Occurs when the border for a ToolStrip is rendered.
Draws the background of a ToolStripContentPanel.
Draws the background of a ToolStripPanel.
Draws the background of a ToolStripStatusLabel.
Use the ToolStrip. Rather than custom painting a ToolStrip and the ToolStripItem objects it contains, you set the ToolStrip::Renderer property to an object that inherits from . The painting specified by the is applied to the ToolStrip, as well as the items it contains.class to apply a particular style or theme to a
You can do custom painting in ToolStrip controls in several ways. As with other Windows Forms controls, the ToolStrip and ToolStripItem both have overridable OnPaint methods and Paint events. As with regular painting, the coordinate system is relative to the client area of the control; that is, the upper left-hand corner of the control is 0, 0. The Paint event and OnPaint method for a ToolStripItem behave like other control paint events.
The ToolStrip. The event arguments for these methods expose several properties such as rectangles, colors, and text formats that you can adjust as desired.class has overridable methods for painting the background, item background, item image, item arrow, item text, and border of the
To adjust just a few aspects of how an item is painted, you typically override the.
If you are writing a new item and want to control all aspects of the painting, override the OnPaint method. From within OnPaint, you can use methods from the.
The following code example demonstrates how to implement a custom GridStripRenderer class customizes three aspects of the GridStrip control's appearance: GridStrip border, ToolStripButton border, and ToolStripButton image. For a full code listing, see How to: Implement a Custom ToolStripRenderer.class. The
Available since 2.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.