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
840
Disable the ability for UltraExplorerBarGroups to expand/collapse?
posted

I'm using the Groups in my UltraExplorerBar as a navigation element.  (forms are loaded when the user clicks on a group)...

 

I would like to disable whatever it is in the control that expands/collapses the panel when the user clicks on the header.

Is this possible?  Thank you very much in advance.

Parents
No Data
Reply
  • 69832
    Verified Answer
    Offline posted

    One solution would be to handle GroupExpanding/GroupCollapsing, use the UltraExplorerBar.UIElement.ElementFromPoint method to hit test for the ExpansionIndicatorUIElement, and cancel the event if the hit test does not yield one:

    void explorerBar_GroupExpanding(object sender, CancelableGroupEventArgs e)
    {
        UltraExplorerBar explorerBar = sender as UltraExplorerBar;
        bool expand = false;
        Point point = explorerBar.PointToClient(Control.MousePosition);
        UIElement element = explorerBar.UIElement.ElementFromPoint( point );

        while ( element != null )
        {
            if ( element is ExpansionButtonUIElement )
            {
                expand = true;
                break;
            }
           
            element = element.Parent;
        }

        e.Cancel = ! expand;
    }

Children