HypernovaDesktop Components · docs
Binarymission
WinFormsExplorer Bar › BinaryExplorerBar

BinaryExplorerBar

class.NET 6 / 8 / 10.NET Framework 4.8Binarymission.WinForms.Controls.NavigationControls

A feature-rich collapsible/expandable panel bar .NET control.

public class BinaryExplorerBar : Panel, IBinaryControlExtendedServices

Inherits from / implements: Panel, IBinaryControlExtendedServices

Remarks

BinaryExplorerBar control provides a feature-rich navigation panel bar, emulating the collapsible panel bar that appears as the side-bar in the Windows XP Explorer tool.

Members at a glance

BinaryExplorerBarInitializes a new instance of BinaryExplorerBar class.
BackColorGets or sets the backcolor of the control.
BackgroundStyleGets or sets the ControlBackgroundPaintingStyle for the control.
CollapseExpandAnimationIntervalGets or sets the time interval to be used while performing an expand/collapse animation.
DefaultPanelBorderColorGets or sets the default colour of the border drawn around each child panel.
DefaultPanelBottomMarginGets or sets the gap, in logical (96 DPI) pixels, left under the last panel.
DefaultPanelLeftMarginGets or sets the default left margin (in pixel units) for the Panel object.
DefaultPanelRightMarginGets or sets the default right margin (in pixel units) for the Panel object.
DefaultPanelShadowColorGets or sets the default colour of each child panel's drop shadow.
DefaultPanelShadowDepthGets or sets the depth, in logical (96 DPI) pixels, of the drop shadow drawn under each child panel. Zero, the default, draws none.
DefaultPanelTitleBackColorGets or sets the default backcolor for the child panel's title.
DefaultPanelTitleBackgroundImageGets or sets the default background image for panel's title.
DefaultPanelTitleBackgroundImageTransparentColorGets or sets the default transparent color for the background image of the child panel's title.
DefaultPanelTitleFontGets or sets the default Font for the child panel's (BinaryExplorerBarPanel) title.
DefaultPanelTitleForeColorGets or sets the default forecolor for the child panel's title.
DefaultPanelTitleGradientBeginColorGets or sets the default gradient begin color for the child panel's title.
DefaultPanelTitleGradientEndColorGets or sets the default gradient end color for the child panel's title.
DefaultPanelTitleHoverColorGets or sets the default hover color for the child panel's title.
DefaultPanelTopMarginGets or sets the default top margin (in pixel units) for the Panel object.
GradientBeginColorGets or sets the gradient begin color for painting the control's background.
GradientEndColorGets or sets the gradient end color for painting the control's background.
IsPanelResizableGets or sets whether to enable resizing of child panels.
OnHoverUpDownArrowColorGets or sets the color for the Up/Down arrow image, when the mouse pointer is over the panel object's title bar.
OnHoverUpDownArrowEllipseFillColorGets or sets the Ellipse fill color for the Up/Down arrow image, when the mouse pointer is over the Panel object's title bar.
OnNormalUpDownArrowColorGets or sets the color for the Up/Down arrow image.
OnNormalUpDownArrowEllipseFillColorGets or sets the Ellipse fill color for the Up/Down arrow image that appears at the right most corner of the BinaryExplorerBarPanel object.
PanelsBinaryExplorerBarPanelCollection of panels for BinaryExplorerBar.
PerformAnimationGets or sets whether to perform an animation while expanding/collapsing the panel objects.
ReflectCurrentXPThemeGets or sets whether to reflect the current active XP theme.
ShadowColorGets or sets the colour of the bar's own drop shadow.
ShadowDepthGets or sets the depth, in logical (96 DPI) pixels, of the drop shadow drawn along the bar's own right and bottom edges. Zero, the default, draws none.
ShouldPaintPanelItemCornersAsRoundedRectWhether panel items are drawn with rounded corners rather than square ones.
ThemeOrCustomColorsGets or sets a flag as to which option to use, when the ReflectCurrentXPTheme property is set to false.
XPThemeGets or sets an Windows XP theme to emulate.
EmulateThisXPThemeEnables painting the control with XP theme colors.
OnControlRemovedRaises the ControlRemoved event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnHandleCreatedRaises the HandleCreated event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseDownRaises the MouseDown event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseEnterRaises the MouseEnter event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseLeaveRaises the MouseLeave event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseMoveRaises the MouseMove event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseUpRaises the MouseUp event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnMouseWheelRaises the MouseWheel event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnPaintRaises the Paint event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnScrollRaises the Scroll event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnSizeChangedRaises the SizeChanged event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnSystemColorsChangedRaises the SystemColorsChanged event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
OnVisibleChangedRaises the VisibleChanged event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.
ResetAllPanelsStateLets you Expand/Collapse all of the BinaryExplorerBarPanel objects in just one method call.
ResetThisPanelStateLets you Expand/Collapse a specified BinaryExplorerBarPanel object in just one method call.
BinaryExplorerBarPanelTitleClickedThis event is raised when the user clicks on a specific BinaryExplorerBarPanel object's title.

Constructors

BinaryExplorerBar

public BinaryExplorerBar()

Initializes a new instance of BinaryExplorerBar class.

Properties

BackColor

public override Color BackColor

Gets or sets the backcolor of the control.

BackgroundStyle

public ControlBackgroundPaintingStyle BackgroundStyle

Gets or sets the ControlBackgroundPaintingStyle for the control.

CollapseExpandAnimationInterval

public int CollapseExpandAnimationInterval

Gets or sets the time interval to be used while performing an expand/collapse animation.

DefaultPanelBorderColor

public Color DefaultPanelBorderColor

Gets or sets the default colour of the border drawn around each child panel.

If you need to set the same value for a given property across all BinaryExplorerBarPanel objects, you could set this property with such value.
Once set, this property's value will be used across all panel objects unless that particular panel object has a specific value set for this property. The border encloses the title bar and the panel body together, one pixel outside the panel's own bounds, inside the bar's left and right margins. Empty - the default - draws nothing.

DefaultPanelBottomMargin

public int DefaultPanelBottomMargin

Gets or sets the gap, in logical (96 DPI) pixels, left under the last panel.

Scrolled to the end, the last panel's bottom edge used to land exactly on the bar's own, which reads as the panel being cut off rather than finished - and left no room for its shadow. The gap is part of the scrollable area, so it is there at the end of the scroll rather than taken out of the panels.

DefaultPanelLeftMargin

public int DefaultPanelLeftMargin

Gets or sets the default left margin (in pixel units) for the Panel object.

DefaultPanelRightMargin

public int DefaultPanelRightMargin

Gets or sets the default right margin (in pixel units) for the Panel object.

DefaultPanelShadowColor

public Color DefaultPanelShadowColor

Gets or sets the default colour of each child panel's drop shadow.

A panel that sets its own PanelShadowColor uses that instead. Empty, the default, is a soft black.

DefaultPanelShadowDepth

public int DefaultPanelShadowDepth

Gets or sets the depth, in logical (96 DPI) pixels, of the drop shadow drawn under each child panel. Zero, the default, draws none.

A panel that sets its own PanelShadowDepth uses that instead. The shadow is drawn in the bar's margins round the panel, where its border is drawn, so the margins have to be at least as wide as the shadow is deep - they are twelve logical pixels by default.

DefaultPanelTitleBackColor

public Color DefaultPanelTitleBackColor

Gets or sets the default backcolor for the child panel's title.

If you need to set the same value for a given property across all BinaryExplorerBarPanel objects, you could set this property with such value.
Once set, this property's value will be used across all panel objects unless that particular panel object has a specific value set for this property.

DefaultPanelTitleBackgroundImage

public Bitmap DefaultPanelTitleBackgroundImage

Gets or sets the default background image for panel's title.

If you need to set the same value for a given property across all BinaryExplorerBarPanel objects, you could set this property with such value.
Once set, this property's value will be used across all panel objects unless that particular panel object has a specific value set for this property.

DefaultPanelTitleBackgroundImageTransparentColor

public Color DefaultPanelTitleBackgroundImageTransparentColor

Gets or sets the default transparent color for the background image of the child panel's title.

If you need to set the same value for a given property across all BinaryExplorerBarPanel objects, you could set this property with such value.
Once set, this property's value will be used across all panel objects unless that particular panel object has a specific value set for this property.

DefaultPanelTitleFont

public Font DefaultPanelTitleFont

Gets or sets the default Font for the child panel's (BinaryExplorerBarPanel) title.

If you need to set the same value for a given property across all BinaryExplorerBarPanel objects, you could set this property with such value.
Once set, this property's value will be used across all panel objects unless that particular panel object has a specific value set for this property.

DefaultPanelTitleForeColor

public Color DefaultPanelTitleForeColor

Gets or sets the default forecolor for the child panel's title.

If you need to set the same value for a given property across all BinaryExplorerBarPanel objects, you could set this property with such value.
Once set, this property's value will be used across all panel objects unless that particular panel object has a specific value set for this property.

DefaultPanelTitleGradientBeginColor

public Color DefaultPanelTitleGradientBeginColor

Gets or sets the default gradient begin color for the child panel's title.

If you need to set the same value for a given property across all BinaryExplorerBarPanel objects, you could set this property with such value.
Once set, this property's value will be used across all panel objects unless that particular panel object has a specific value set for this property.

DefaultPanelTitleGradientEndColor

public Color DefaultPanelTitleGradientEndColor

Gets or sets the default gradient end color for the child panel's title.

If you need to set the same value for a given property across all BinaryExplorerBarPanel objects, you could set this property with such value.
Once set, this property's value will be used across all panel objects unless that particular panel object has a specific value set for this property.

DefaultPanelTitleHoverColor

public Color DefaultPanelTitleHoverColor

Gets or sets the default hover color for the child panel's title.

If you need to set the same value for a given property across all BinaryExplorerBarPanel objects, you could set this property with such value.
Once set, this property's value will be used across all panel objects unless that particular panel object has a specific value set for this property.

DefaultPanelTopMargin

public int DefaultPanelTopMargin

Gets or sets the default top margin (in pixel units) for the Panel object.

GradientBeginColor

public Color GradientBeginColor

Gets or sets the gradient begin color for painting the control's background.

This property will have effect only when the control's background painting style is set to ControlBackgroundPaintingStyle.GradientColorStyle.
Refer ControlBackgroundPaintingStyle enumeration for more details.

GradientEndColor

public Color GradientEndColor

Gets or sets the gradient end color for painting the control's background.

This property will have effect only when the control's background painting style is set to ControlBackgroundPaintingStyle.GradientColorStyle.
Refer ControlBackgroundPaintingStyle enumeration for more details.

IsPanelResizable

public bool IsPanelResizable

Gets or sets whether to enable resizing of child panels.

OnHoverUpDownArrowColor

public Color OnHoverUpDownArrowColor

Gets or sets the color for the Up/Down arrow image, when the mouse pointer is over the panel object's title bar.

OnHoverUpDownArrowEllipseFillColor

public Color OnHoverUpDownArrowEllipseFillColor

Gets or sets the Ellipse fill color for the Up/Down arrow image, when the mouse pointer is over the Panel object's title bar.

OnNormalUpDownArrowColor

public Color OnNormalUpDownArrowColor

Gets or sets the color for the Up/Down arrow image.

OnNormalUpDownArrowEllipseFillColor

public Color OnNormalUpDownArrowEllipseFillColor

Gets or sets the Ellipse fill color for the Up/Down arrow image that appears at the right most corner of the BinaryExplorerBarPanel object.

Panels

public BinaryExplorerBarPanelCollection Panels

BinaryExplorerBarPanelCollection of panels for BinaryExplorerBar.

PerformAnimation

public bool PerformAnimation

Gets or sets whether to perform an animation while expanding/collapsing the panel objects.

ReflectCurrentXPTheme

public bool ReflectCurrentXPTheme

Gets or sets whether to reflect the current active XP theme.

ShadowColor

public Color ShadowColor

Gets or sets the colour of the bar's own drop shadow.

The colour's alpha sets how dark the shadow is at its strongest; an opaque colour gives a shadow about half that strength next to the edge, fading to nothing. Empty, the default, is a soft black.

ShadowDepth

public int ShadowDepth

Gets or sets the depth, in logical (96 DPI) pixels, of the drop shadow drawn along the bar's own right and bottom edges. Zero, the default, draws none.

A control cannot paint outside itself, so the shadow is drawn in a strip of the bar's own right and bottom edges: that strip is filled with the colour behind the control - its parent's - and the bar's surface and its panels stop short of it. Give the bar a few pixels of room in its parent's layout, as a shadow needs in any case.

ShouldPaintPanelItemCornersAsRoundedRect

public bool ShouldPaintPanelItemCornersAsRoundedRect

Whether panel items are drawn with rounded corners rather than square ones.

ThemeOrCustomColors

public ThemeOrCustomColors ThemeOrCustomColors

Gets or sets a flag as to which option to use, when the ReflectCurrentXPTheme property is set to false.

XPTheme

public XPTheme XPTheme

Gets or sets an Windows XP theme to emulate.

Please note that the control only tries to emulate Windows XP themes as close as possible. The final theme color is not guaranteed to be exactly the same as Windows XP theme colors.

Methods

EmulateThisXPTheme

public void EmulateThisXPTheme (XPTheme theTheme)

Enables painting the control with XP theme colors.

theTheme
A supported XP theme.
Call this method whenever you need to render the control using a supported XP theme.
Note: The control Emulates painting the control with an XP theme as closely as possible.
This may not achieve an exact reproduction of XP theme color (since the simulation is custom drawn). This method can render the control with emulated XP theme colors even in Windows 2000 Operating System.
Refer to XPTheme enumeration for the supported XP themes.

OnControlRemoved

protected override void OnControlRemoved(ControlEventArgs e)

Raises the ControlRemoved event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnHandleCreated

protected override void OnHandleCreated(EventArgs e)

Raises the HandleCreated event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseDown

protected override void OnMouseDown(MouseEventArgs e)

Raises the MouseDown event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseEnter

protected override void OnMouseEnter(EventArgs e)

Raises the MouseEnter event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseLeave

protected override void OnMouseLeave(EventArgs e)

Raises the MouseLeave event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseMove

protected override void OnMouseMove(MouseEventArgs e)

Raises the MouseMove event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseUp

protected override void OnMouseUp(MouseEventArgs e)

Raises the MouseUp event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnMouseWheel

protected override void OnMouseWheel(MouseEventArgs e)

Raises the MouseWheel event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.
The wheel scrolls through the base class without raising Scroll , so it needs the same repaint - see OnScroll.

OnPaint

protected override void OnPaint(PaintEventArgs pe)

Raises the Paint event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

pe
The data for the event.

OnScroll

protected override void OnScroll(ScrollEventArgs se)

Raises the Scroll event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

se
The data for the event.
Windows scrolls a window by moving its pixels and repainting only the strip that comes into view. That is right for anything that travels with the content and wrong for everything this control draws in its margins: the panel borders and shadows are drawn from the panels' positions, and the bar's own shadow strip does not move at all, so both were left smeared down the sides. Repainting the whole client on a scroll costs a frame and cannot flicker - the control is double buffered.

OnSizeChanged

protected override void OnSizeChanged(EventArgs e)

Raises the SizeChanged event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnSystemColorsChanged

protected override void OnSystemColorsChanged(EventArgs e)

Raises the SystemColorsChanged event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

OnVisibleChanged

protected override void OnVisibleChanged(EventArgs e)

Raises the VisibleChanged event. BinaryExplorerBar overrides it so the control's own handling runs alongside the base behavior.

e
The data for the event.

ResetAllPanelsState

public void ResetAllPanelsState(BinaryExplorerBarPanelState state)

Lets you Expand/Collapse all of the BinaryExplorerBarPanel objects in just one method call.

state
One of the states as defined in BinaryExplorerBarPanelState enumeration.

ResetThisPanelState

public void ResetThisPanelState(BinaryExplorerBarPanelState state, int panelIndex)

Lets you Expand/Collapse a specified BinaryExplorerBarPanel object in just one method call.

state
One of the states as defined in BinaryExplorerBarPanelState enumeration.
panelIndex
Index of the particular BinaryExplorerBarPanel object.

Events

BinaryExplorerBarPanelTitleClicked

public event BinaryExplorerBarPanelTitleClickedHandler BinaryExplorerBarPanelTitleClicked

This event is raised when the user clicks on a specific BinaryExplorerBarPanel object's title.

Refer to BinaryExplorerBarPanelTitleClickedHandler delegate for more details.