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.
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;}
Perfect... that was exactly what I was looking for.