WinForms › Explorer Bar › BinaryExplorerBarPanelTitleClickedHandler
BinaryExplorerBarPanelTitleClickedHandler
delegate.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.NavigationControls
Represents the method that handles BinaryExplorerBar.BinaryExplorerBarPanelTitleClicked,
and decides whether the clicked panel is allowed to expand or collapse.
public delegate bool BinaryExplorerBarPanelTitleClickedHandler(object sender, BinaryExplorerBarPanel thePanelObject);
Remarks
The handler runs before the panel changes state, so it can check whether the panel's content is ready, ask the user to save work in a panel that is about to collapse, or keep a panel permanently open.
Examples
explorerBar.BinaryExplorerBarPanelTitleClicked += (sender, panel) =>
{
// The "Order details" panel stays open while an order is being edited.
bool collapsing = panel.CurrentExplorerBarPanelState == BinaryExplorerBarPanelState.Expanded;
return !(panel == orderDetailsPanel && collapsing && orderIsBeingEdited);
};