ToolStripPanelRenderEventArgs Class

Definition

Proporciona datos para el dibujo de ToolStripPanel.Provides data for ToolStripPanel drawing.

public ref class ToolStripPanelRenderEventArgs : EventArgs
public class ToolStripPanelRenderEventArgs : EventArgs
type ToolStripPanelRenderEventArgs = class
    inherit EventArgs
Public Class ToolStripPanelRenderEventArgs
Inherits EventArgs
Inheritance
ToolStripPanelRenderEventArgs

Examples

En el ejemplo de código siguiente se muestra el uso de este tipo.The following code example demonstrates the use of this type. En el ejemplo, un controlador de eventos informa sobre la aparición del evento RenderToolStripPanelBackground.In the example, an event handler reports on the occurrence of the RenderToolStripPanelBackground event. Este informe le ayuda a saber cuándo se produce el evento y puede ayudarle a depurar.This report helps you to learn when the event occurs and can assist you in debugging.

Para ejecutar el código de ejemplo, péguelo en un proyecto que contenga una instancia de un tipo que herede de ToolStripRenderer, como un ToolStripSystemRenderer o ToolStripProfessionalRenderer.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. A continuación, asigne un nombre a la instancia ToolStripRenderer1 y asegúrese de que el controlador de eventos está asociado al evento RenderToolStripPanelBackground.Then name the instance ToolStripRenderer1 and ensure that the event handler is associated with the RenderToolStripPanelBackground event.

private void ToolStripRenderer1_RenderToolStripPanelBackground(Object sender, ToolStripPanelRenderEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "Graphics", e.Graphics );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ToolStripPanel", e.ToolStripPanel );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "Handled", e.Handled );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "RenderToolStripPanelBackground Event" );
}
Private Sub ToolStripRenderer1_RenderToolStripPanelBackground(sender as Object, e as ToolStripPanelRenderEventArgs) _ 
     Handles ToolStripRenderer1.RenderToolStripPanelBackground

    Dim messageBoxVB as New System.Text.StringBuilder()
    messageBoxVB.AppendFormat("{0} = {1}", "Graphics", e.Graphics)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "ToolStripPanel", e.ToolStripPanel)
    messageBoxVB.AppendLine()
    messageBoxVB.AppendFormat("{0} = {1}", "Handled", e.Handled)
    messageBoxVB.AppendLine()
    MessageBox.Show(messageBoxVB.ToString(),"RenderToolStripPanelBackground Event")

End Sub

Constructors

ToolStripPanelRenderEventArgs(Graphics, ToolStripPanel)

Inicializa una nueva instancia de la clase ToolStripPanelRenderEventArgs para el ToolStripPanel especificado que utiliza los gráficos especificados para el dibujo.Initializes a new instance of the ToolStripPanelRenderEventArgs class for the specified ToolStripPanel that uses the specified graphics for drawing.

Properties

Graphics

Obtiene o establece los gráficos que se utilizan para dibujar el ToolStripPanel.Gets or sets the graphics used to paint the ToolStripPanel.

Handled

Obtiene o establece un valor que indica si se controló el evento.Gets or sets a value indicating whether the event was handled.

ToolStripPanel

Obtiene el ToolStripPanel que se va a dibujar.Gets the ToolStripPanel to paint.

Methods

Equals(Object)

Determina si el objeto especificado es igual al objeto actual.Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Sirve como la función hash predeterminada.Serves as the default hash function.

(Inherited from Object)
GetType()

Obtiene el Type de la instancia actual.Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Crea una copia superficial del Object actual.Creates a shallow copy of the current Object.

(Inherited from Object)
ToString()

Devuelve una cadena que representa el objeto actual.Returns a string that represents the current object.

(Inherited from Object)

Applies to