Skip to main content
A newer version of this page is available. .

DockManager.ActivePanel Property

Gets or sets the active dock panel.

Namespace: DevExpress.XtraBars.Docking

Assembly: DevExpress.XtraBars.v19.2.dll

Declaration

[Browsable(false)]
public DockPanel ActivePanel { get; set; }

Property Value

Type Description
DockPanel

A DockPanel object representing the currently active dock panel. null (Nothing in Visual Basic) if there is no active dock panel.

Remarks

The active dock panel is the currently focused panel, or the panel that contains a focused control. An end-user can click a panel or any of its child controls to activate it. The active panel caption is highlighted according to the current paint scheme (BarAndDockingController.PaintStyleName) and the appearance settings (DockManagerAppearances.PanelCaptionActive).

The ActivePanel property can be used to get and set the currently active panel. The following code sample removes the active panel.

dockManager1.RemovePanel(dockManager1.ActivePanel);

You can assign an auto-hidden panel to the ActivePanel property: the panel will be shown on-screen, but will hide again when it loses focus.

If a panel is hidden, assigning it to the ActivePanel property does nothing. Use the DockPanel.Visibility property to change a panel visibility (auto-hidden, hidden or visible), or use the DockPanel.Show method method instead.

When a panel becomes active, the DockManager.ActivePanelChanged event occurs. This event can be handled to perform related actions, for instance, to move focus to a specific control within this panel.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the ActivePanel property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also