ToolStripGripRenderEventArgs Class
TOC
Collapse the table of content
Expand the table of content

ToolStripGripRenderEventArgs Class

 

Provides data for the RenderGrip event.

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

System.Object
  System.EventArgs
    System.Windows.Forms.ToolStripRenderEventArgs
      System.Windows.Forms.ToolStripGripRenderEventArgs

public class ToolStripGripRenderEventArgs : ToolStripRenderEventArgs

NameDescription
System_CAPS_pubmethodToolStripGripRenderEventArgs(Graphics, ToolStrip)

Initializes a new instance of the ToolStripGripRenderEventArgs class.

NameDescription
System_CAPS_pubpropertyAffectedBounds

Gets the Rectangle representing the bounds of the area to be painted. (Inherited from ToolStripRenderEventArgs.)

System_CAPS_pubpropertyBackColor

Gets the Color that the background of the ToolStrip is painted with.(Inherited from ToolStripRenderEventArgs.)

System_CAPS_pubpropertyConnectedArea

Gets the Rectangle representing the overlap area between a ToolStripDropDown and its ToolStripDropDown.OwnerItem.(Inherited from ToolStripRenderEventArgs.)

System_CAPS_pubpropertyGraphics

Gets the Graphics used to paint.(Inherited from ToolStripRenderEventArgs.)

System_CAPS_pubpropertyGripBounds

Gets the rectangle representing the area in which to paint the move handle.

System_CAPS_pubpropertyGripDisplayStyle

Gets the style that indicates whether the move handle is displayed vertically or horizontally.

System_CAPS_pubpropertyGripStyle

Gets the style that indicates whether or not the move handle is visible.

System_CAPS_pubpropertyToolStrip

Gets the ToolStrip to be painted.(Inherited from ToolStripRenderEventArgs.)

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The following code example demonstrates the use of this type. In the example, an event handler reports on the occurrence of the RenderGrip event. This report helps you to learn when the event occurs and can assist you in debugging.

To run the example code, paste it into a project that contains an instance of a type that inherits from ToolStripRenderer, such as a ToolStripSystemRenderer or ToolStripProfessionalRenderer. Then name the instance ToolStripRenderer1 and ensure that the event handler is associated with the RenderGrip event.

private void ToolStripRenderer1_RenderGrip(Object sender, ToolStripGripRenderEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "GripBounds", e.GripBounds );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "GripDisplayStyle", e.GripDisplayStyle );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "GripStyle", e.GripStyle );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "AffectedBounds", e.AffectedBounds );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "BackColor", e.BackColor );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Graphics", e.Graphics );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ToolStrip", e.ToolStrip );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ConnectedArea", e.ConnectedArea );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "RenderGrip Event" );
}

.NET Framework
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.

Return to top
Show:
© 2016 Microsoft