Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
995
How to expand\collapse group only on button click or header double click?
posted

I would like to expand or collapse the group only if the actual expansion indicator button is clicked or the group header is double clicked. Is there a setting for this?

  • 20872
    Suggested Answer
    Offline posted

    Hello,

    If you need to expand/collapse groups only on double clicking the header of the Group and single click on the expansion button, you would follow a similar approach as below:

    Create a bool flag, and set it accordingly in the MouseEnterElement/MouseLeaveElement events where you would have to verify what is the entered element first. (The UIElements might differ between the different styles of the control.) For example if you are using ExporerBar style , you would  have to check for the following UI elements: UltraExplorerBarGroupHeaderUIElement and ExpansionButtonUIElement.

    In the double click event you should verify what is the state of your bool flag and based on that to decide what should happen in the GroupExpanding/GroupCollapsing events of the ExplorerBar.

    If you are not clicking on the desired UIElements, than just cancel the events.

    Hope this helps.