Skip to main content
Tab

ASPxDockManager.AfterDock Event

Fires on the server side after a panel is docked in a zone.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.2.dll

Declaration

public event DockManagerEventHandler AfterDock

Event Data

The AfterDock event's data class is DockManagerEventArgs. The following properties provide information specific to this event:

Property Description
Panel Gets the panel currently being processed.
Zone Gets the zone currently being processed.

Remarks

Write an AfterDock event handler to perform specific actions on the server side after each time the panel is docked. You can use the event parameter’s properties to identify a panel (DockManagerEventArgs.Panel) and zone (DockManagerEventArgs.Zone) currently being processed.

Note

The AfterDock event fires only when you dock a panel by dragging it. If you dock a panel programmatically (e.g. by setting the ASPxDockPanel.OwnerZoneUID property) it does not result in firing the event.

To learn more, see the Common Docking Events topic.

Example

The code sample below demonstrates how you can handle the AfterDock and AfterFloat events to provide different panel appearances for different dock states.

protected void MyASPxDockManager_AfterDock(object source, DevExpress.Web.DockManagerEventArgs e) {
     e.Panel.BackColor = e.Zone.BackColor;
     e.Panel.Styles.Header.BackColor = e.Zone.Border.BorderColor;
}
protected void MyASPxDockManager_AfterFloat(object source, DevExpress.Web.DockManagerEventArgs e) {
     e.Panel.BackColor = System.Drawing.Color.White;
     e.Panel.Styles.Header.BackColor = System.Drawing.Color.LightGray;
}
See Also