BarManager.ActiveEditItemLink Property
Gets the link whose editor is currently active.
Namespace: DevExpress.XtraBars
Assembly: DevExpress.XtraBars.v24.1.dll
NuGet Package: DevExpress.Win.Navigation
Declaration
Property Value
Type | Description |
---|---|
BarEditItemLink | A BarEditItemLink object representing the link that contains the active editor. null (Nothing in Visual Basic) if no editor is currently active. |
Remarks
To add an editor to a bar, you should use a BarEditItem item. Use the item’s BarEditItem.Edit property to assign an editor to the item. This property represents a repository item object providing editor type information and edit settings.
Items within bars and menus are represented by corresponding links. So, the BarEditItem item is represented by a BarEditItemLink. Editors are created by links based on the information provided by repository items. This occurs when a link is activated (receives focus). When the editor loses focus, the editor is destroyed.
The ActiveEditItemLink property allows you to obtain the edit link containing the active editor. Note that this property returns a valid value only when an editor is activated and it is located within a BarEditItemLink. If no editor is currently active, or the active editor does not belong to a BarEditItemLink, the ActiveEditItemLink property returns null (Nothing in Visual Basic).
To access the active editor directly, use the BarManager.ActiveEditor property.
Note
If you open an MDI child form while there is an active editor in the RibbonControl or BarManager, you may observe focus issues. It is suggested that you close the active editor before showing an MDI child form via the BarEditItemLink.CloseEditor method.
ribbonControl1.Manager.ActiveEditItemLink.CloseEditor();