Back to Devexpress

DockManager.ClosedPanel Event

windowsforms-devexpress-dot-xtrabars-dot-docking-dot-dockmanager-15293e1c.md

latest2.5 KB
Original Source

DockManager.ClosedPanel Event

Occurs after a panel has been closed.

Namespace : DevExpress.XtraBars.Docking

Assembly : DevExpress.XtraBars.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Docking")]
public event DockPanelEventHandler ClosedPanel
vb
<DXCategory("Docking")>
Public Event ClosedPanel As DockPanelEventHandler

Event Data

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

PropertyDescription
PanelGets the processed dock panel.

Remarks

The ClosedPanel event occurs after a panel has been closed. It serves as a notification and can’t be used to prevent a panel from being closed. To prevent a panel from being closed, handle the DockManager.ClosingPanel event. See this member’s description for more information.

When users click a Close button, panels change their visibility to “Hidden” and move to the HiddenPanels collection. This allows you to access closed panels and restore them. If you want the Close button to dispose of closed panels rather than move them to the HiddenPanels collection, handle the ClosedPanel event and destroy panels manually.

csharp
void DockManager1_ClosedPanel(object sender, DockPanelEventArgs e) {
    e.Panel.Dispose();
}
vb
Private Sub DockManager1_ClosedPanel(ByVal sender As Object, ByVal e As DockPanelEventArgs)
    e.Panel.Dispose()
End Sub

See Also

ClosingPanel

DockManager Class

DockManager Members

DevExpress.XtraBars.Docking Namespace