All docs
V20.1
20.1
19.2
19.1
The page you are viewing does not exist in version 19.1. This link will take you to the root page.
18.2
The page you are viewing does not exist in version 18.2. This link will take you to the root page.
18.1
The page you are viewing does not exist in version 18.1. This link will take you to the root page.
17.2
The page you are viewing does not exist in version 17.2. This link will take you to the root page.

AccordionControl.ShowPopupForm(AccordionControlElement) Method

Shows the pop-up form.

Namespace: DevExpress.XtraBars.Navigation

Assembly: DevExpress.XtraBars.v20.1.dll

Declaration

public void ShowPopupForm(
    AccordionControlElement element
)
Public Sub ShowPopupForm(
    element As AccordionControlElement
)

Parameters

Name Type Description
element AccordionControlElement

An object that specifies the element for which to show the pop-up form.

Remarks

If the control is minimized (see AccordionControl.OptionsMinimizing.State), it displays a pop-up form when the user clicks an element.

You can use the AccordionControl.OptionsMinimizing.PopupFormAutoHeightMode property to specify how the control calculates the form height.

To open the pop-up form in code, call the ShowPopupForm method. For instance, you can open the form when the mouse pointer hovers an item. To check if the form is already displayed, use the IsPopupFormShown property. To close the form, call the ClosePopupForm() method.

Examples

The code below shows how to automatically display the pop-up form for an element when the user hovers the element with the mouse pointer.

using DevExpress.XtraBars.Navigation;

accordionControl1.MouseMove += AccordionControl1_MouseMove;

AccordionControlElement hoveredElement = null;
private void AccordionControl1_MouseMove(object sender, MouseEventArgs e) {
    AccordionControl accordionControl = sender as AccordionControl;
    var hitInfo = accordionControl.CalcHitInfo(e.Location);
    if(hitInfo.IsInElement) {
        if(hoveredElement == hitInfo.ItemInfo.Element && accordion.IsPopupFormShown) {
            return;
        }
        accordion.ShowPopupForm(hitInfo.ItemInfo.Element);
        hoveredElement = hitInfo.ItemInfo.Element;
    }
}

The code below shows how to close the pop-up form when the user clicks an item.

using DevExpress.XtraBars.Navigation;

accordionControl1.OptionsHamburgerMenu.DisplayMode = AccordionControlDisplayMode.Inline;
accordionControl1.ViewType = AccordionControlViewType.HamburgerMenu;

private void accordionControl1_ElementClick(object sender, DevExpress.XtraBars.Navigation.ElementClickEventArgs e) {
    AccordionControl accordionControl = sender as AccordionControl;
    if (e.MouseButton == MouseButtons.Left && accordionControl.IsPopupFormShown) {
        accordionControl.ClosePopupForm();
        e.Handled = true;
    }
}
See Also