Windows Dev Center

Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ToolStripItemRenderEventArgs Class

Provides data for the events that render the background of objects derived from ToolStripItem in the ToolStripRenderer class.

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

public ref class ToolStripItemRenderEventArgs : public EventArgs

The ToolStripItemRenderEventArgs type exposes the following members.

  NameDescription
Public methodToolStripItemRenderEventArgsInitializes a new instance of the ToolStripItemRenderEventArgs class for the specified ToolStripItem and using the specified Graphics.
Top

  NameDescription
Public propertyGraphicsGets the graphics used to paint the ToolStripItem.
Public propertyItemGets the ToolStripItem to paint.
Public propertyToolStripGets the value of the ToolStripItem::Owner property for the ToolStripItem to paint.
Top

  NameDescription
Public methodEquals(Object)Determines whether the specified object is equal to the current object. (Inherited from Object.)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as the default hash function. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodToStringReturns a string that represents the current object. (Inherited from Object.)
Top

The following code example demonstrates how to override the OnRenderButtonBackground method to draw a border around a ToolStripButton control's Image. This code example is part of a larger example provided for the ToolStripRenderer class.

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

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0, 2.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft