LayoutEventArgs Class

 

Provides data for the Layout event. This class cannot be inherited.

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

System.Object
  System.EventArgs
    System.Windows.Forms.LayoutEventArgs

[<Sealed>]
type LayoutEventArgs = 
    class
        inherit EventArgs
    end

NameDescription
System_CAPS_pubmethodLayoutEventArgs(Control, String)

Initializes a new instance of the LayoutEventArgs class with the specified control and property affected.

System_CAPS_pubmethodLayoutEventArgs(IComponent, String)

Initializes a new instance of the LayoutEventArgs class with the specified component and property affected.

NameDescription
System_CAPS_pubpropertyAffectedComponent

Gets the Component affected by the layout change.

System_CAPS_pubpropertyAffectedControl

Gets the child control affected by the change.

System_CAPS_pubpropertyAffectedProperty

Gets the property affected by the change.

NameDescription
System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(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_pubmethodToString()

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

Changes to a control such as resizing, showing or hiding child controls, and adding or removing child controls make it necessary for a control to layout its child controls. A LayoutEventArgs specifies the child control that has been changed and its affected property. For example, if a control has been made visible since the last layout operation, the Visible property is affected.

The AffectedControl and AffectedProperty properties are set to null if no values were provided when the PerformLayout method was called.

For more information about handling events, see Handling and Raising Events.

The following code example uses the AffectedProperty and AffectedControl properties as LayoutEventHandler arguments to coordinate the size of a Windows form and its controls with various property changes to both the Windows form and the controls.

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

.NET Framework
Available since 1.1

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: