BinaryPanelBar
BinaryPanelBar control class - An extended UserControl class that mimics the MS Outlook (C) style Navigation/Side-bar control.
public partial class BinaryPanelBar : UserControl
Inherits from / implements: UserControl
Remarks
BinaryPanelBar control class - An extended UserControl class that mimics the MS Outlook (C) style Navigation/Side-bar control.
Members at a glance
BinaryPanelBar | Creates a new instance of BinaryPanelBar control object. |
AddShowNavigationOptionsMenuItem | Gets or sets whether to show the "Show Navigation Panel Options..." content menu item. |
AddShowNavigationOptionsMenuResourceProviderInstance | Gets or sets the add show navigation options menu resource provider instance. |
BorderStyle | Provides a new implementation for BorderStyle for this control. |
ButtonBorderStyle | Gets or sets the border style for all of the BinaryPanelBarButton objects that are currently hosted in this instance of BinaryPanelBar control. |
ButtonHoverEndColor | Gets or sets the gradient end colour drawn on a button the pointer is over. |
ButtonHoverSelectedEndColor | Gets or sets the gradient end colour drawn when the pointer is over the selected button. |
ButtonHoverSelectedStartColor | Gets or sets the gradient start colour drawn when the pointer is over the selected button. |
ButtonHoverStartColor | Gets or sets the gradient start colour drawn on a button the pointer is over. |
ButtonSelectedEndColor | Gets or sets the gradient end colour drawn on the selected button. |
ButtonSelectedStartColor | Gets or sets the gradient start colour drawn on the selected button. |
CollapseExpandButtonColor | Gets or sets the color of the Collapse/expand button. |
ContextMenuChevronColor | Gets or sets the control's context menu button's chevron drawing color. |
ControlBorderStyle | Gets or sets the control's border style. |
ControlInCollapsedMode | Gets or sets whether the bar is collapsed to a narrow rail at its docked edge. |
CurrentlySelectedButton | Gets the currently selected/activated BinaryPanelBarButton. |
CustomChevronImage | Gets or sets the custom Bitmap object for the control's chevron (i.e. the context menu button) image. |
CustomImageTransparentColor | Gets or sets a transparency color for the custom image that is set in the control's property CustomChevronImage. |
EndColor | Gets or sets the end color value to be used to draw the control's button objects when the control's XPThemeToEmulate value is set to None. |
GripperColor | Gets or sets the gripper color. |
GripperHeight | Gets or sets the control's gripper handle height. |
HowManyPanelButtonsToShow | Gets or sets the number of BinaryPanelBarButton objects to display in this instance of BinaryPanelBar control. |
ItemColorRenderingStyle | Gets or sets the rendering style for drawing the menu item selection rectangle area. |
Items | Gets the list of all BinaryPanelBarButton objects that are currently hosted in this instance of BinaryPanelBar control. |
LeftMarginForDrawingMainHeaderText | Gets or sets the left margin, when drawing the control's main header text. |
MainHeaderHeight | Gets or sets the height of the control's main header strip, in logical (96 DPI) units. |
MainHeaderTextColor | Gets or sets the the color for drawing the control's main header text. |
MainHeaderTextFont | Gets or sets the Font to be used, when drawing the control's main header text. |
MenuItemAvailableButtonCheckedStateBorderColor | Gets or sets the border color for the available button's image checked state, in the context menu / chevron menu system in the control. |
MenuItemSelectionBackgroundColor | Gets or sets the selection background color for the menu item in the context menu / chevron menu system in the control. |
PanelBarButtons | The panel bar's buttons, gathered from its child controls. The list is built on each read, so it is a snapshot rather than a live view. |
PanelBarWindowFillColorWhenInCollapsedModeAndTheContainedPanelIsShowing | Gets or sets the fill color for the panel window, when the control is in collapsed mode and the contained panel for the current active panel window is showing . |
PanelBarWindowFillColorWhenInCollpasedMode | Gets or sets the fill color for the panel window, when the control is in collapsed mode. |
PanelBarWindowTextColorWhenInCollpasedMode | Gets or sets the fore color for the panel text that will be displayed, when the control is in the collapsed panel mode. |
PanelText | Gets or sets the text for the control's main heading area. |
PanelWindowTextFontWhenInCollapsedMode | Gets or sets the font for the text that will be displayed in the collapsed panel window |
PanelWindowTextWhenGripperIsOnMove | Gets or sets the text that will be displayed in the panel window, when the control is in collapsed mode and when the user is moving the gripper handle up/down. |
ReflectCurrentXPThemeColorOnLoad | Gets or sets whether the control should paint itself based on the current active XP theme. |
RenderInOutlookStyleExpandCollapseMode | Gets or sets whether to switch on / off the Outlook style expand/collapsing feature. |
SelectedButton | Gets the currently selected BinaryPanelBarButton object. |
ShouldAutoResetFocusToControlAfterPopupWindowHide | Gets or sets whether the control should automatically set the focus to itself soon after the user has hidden / dismissed the pop-up window when in collapsed mode. |
Size | Provides a newer implementation. |
StartColor | Gets or sets the start color value to be used to draw the control's button objects when the control's XPThemeToEmulate value is set to None. |
TopMarginForDrawingMainHeaderText | Gets or sets the top margin, when drawing the control's main header text. |
UpdateWhenSystemColorsChanges | Gets or sets whether the control needs to repaint itself when the SystemColorsChanged event is raised. |
UseSolidBrushWhenPaintingButtons | Gets or sets whether to use a SolidBrush to paint the control and its button objects when the control's XPThemeToEmulate property is set to None value and valid start and end colors have been set. |
WirePanelBarButtonClickEventToBaseBarButton | Gets or sets whether any click event handler that you have attached to the BinaryPanelBarButton object should be wired into the small / minimized "related" button (that sits in the base bar) click event. |
XPThemeToEmulate | Gets or sets the XPTheme to be emulated when drawing this instance of the control. |
AddBinaryPanelBarButton | A helper method to add a BinaryPanelBarButton object into this control's instance. |
DeSelectBinaryPanelBarButton | A helper method to deselect a particular (existing) BinaryPanelBarButton object from this control's instance. |
DeSelectBinaryPanelBarButton | A helper method to deselect a particular (existing) BinaryPanelBarButton object from this control's instance. |
Dispose | Refer the base class documentation for this method. |
GetPanelButtonAt | A helper method to get an instance of BinaryPanelBarButton that is located at the specified coordinates. |
ItemAt | Gets the instance of the BinaryPanelBarButton object that is at a specified index position in the collection of objects in this instance of BinaryPanelBar control. |
MakeAvailableAllBinaryPanelBarButtonObjects | A helper method to "make available for use" all of the BinaryPanelBarButton objects that are currently in this instance of BinaryPanelBar control. |
MakeAvailableForUseOnlyTheSpecifiedBinaryPanelBarButtons | A helper method to "make available for use", only a certain BinaryPanelBarButton objects. |
MakeUnAvailableAllBinaryPanelBarButtonObjects | A helper method to "make unavailable for use" all of the BinaryPanelBarButton objects that are currently in this instance of BinaryPanelBar control. |
MoveDownByOneIndexTheSpecifiedBinaryPanelBarButtonObject | A helper method to move down in index, by one level, of the particular BinaryPanelBarButton object that is currently in the list of controls hosted by this instance of BinaryPanelBar control. |
MoveUpByOneIndexTheSpecifiedBinaryPanelBarButtonObject | A helper method to move up in index, by one level, of the particular BinaryPanelBarButton object that is currently in the list of controls hosted by this instance of BinaryPanelBar control. |
OnDockChanged | Raises the DockChanged event. BinaryPanelBar overrides it so the control's own handling runs alongside the base behavior. |
OnHandleCreated | Refer to base class documentation. |
OnMouseDown | Refer the base class documentation for this method. |
OnPaint | Refer the base class documentation for this method. |
OnResize | Refer the base class documentation for this method. |
OnSizeChanged | Raises the SizeChanged event. BinaryPanelBar overrides it so the control's own handling runs alongside the base behavior. |
OnSystemColorsChanged | Refer to base class documentation. |
RemoveBinaryPanelBarButton | A helper method to remove a particular (existing) BinaryPanelBarButton object from this control's instance. |
RemoveBinaryPanelBarButton | A helper method to remove a particular (existing) BinaryPanelBarButton object from this control's instance. |
ResetAvailabilityStatusOfThePanelBarButtonObject | A helper method to reset the "availability for use" of a specified BinaryPanelBar object. |
ResetIndexForTheSpecifiedBinaryPanelBarButtonObject | A helper method to reset the index of a particular BinaryPanelBarButton object. |
SelectBinaryPanelBarButton | A helper method to select a particular (existing) BinaryPanelBarButton object in this control's instance. |
SelectBinaryPanelBarButton | A helper method to select a particular (existing) BinaryPanelBarButton object in this control's instance. |
ShowSpecifiedBinaryPanelBarButtonsInMainViewList | A helper method to "make visible" a specific set of BinaryPanelBarButton objects that are currently in this instance of BinaryPanelBar control. |
AboutToCollapseOrExpand | Occurs when the control is about to collapse or expand. |
BinaryPanelBarButtonClicked | This event is raised when a particular instance of BinaryPanelBarButton object is clicked. |
BinaryPanelBarButtonContainedPanelAppliedOrChanged | This event is raised when a particular instance of BinaryPanelBarButton object's associated BinaryPanelBarContainedPanel object is changed via changing the ContainedPanel property. |
BinaryPanelBarButtonImageChanged | This event is raised when a particular instance of BinaryPanelBarButton object's image is changed. |
BinaryPanelBarButtonNotAvailableForUseChanged | This event is raised when a particular instance of BinaryPanelBarButton object is made unavailable for use (either by the user or programmatic). |
BinaryPanelBarButtonNotAvailableForUseChanging | This event is raised when a particular instance of BinaryPanelBarButton object is about to be made unavailable for use (either by the user or programmatic). |
BinaryPanelBarButtonTextChanged | This event is raised when a particular instance of BinaryPanelBarButton object's text is changed. |
BinaryPanelBarButtonVisibleChanged | This event is raised when a particular instance of BinaryPanelBarButton object's visibility is changed. |
CollapseExpandButtonClicked | Occurs when the BinaryPanelBar control's collapse / expand button is clicked. |
ContextMenuShowNavigationPaneOptionsClicked | This event is raised when the ContextMenu menu item to open up the "Navigation pane options" is clicked by the user. |
GripperHandleMoved | This event is raised when the user moves the gripper handle (in the control) to hide/show BinaryPanelBarButton button objects that are currently available for use in the control. |
ShowFewerButtonsMenuItemClicked | This event is raised when the user clicks on the "Show fewer buttons" context menu item. |
ShowMoreButtonsMenuItemClicked | This event is raised when the user clicks on the "Show more buttons" context menu item. |
XpThemeChanged | This event is raised when the control's XPThemeToEmulate property is changed. |
XpThemeChanging | This event is raised when the control's XPThemeToEmulate property is about to be changed. |
Constructors
BinaryPanelBar
Creates a new instance of BinaryPanelBar control object.
Properties
BorderStyle
Provides a new implementation for BorderStyle for this control.
ButtonBorderStyle
Gets or sets the border style for all of the BinaryPanelBarButton objects that are currently hosted in this instance of BinaryPanelBar control.
ButtonBorderStyle property for more details.ButtonHoverEndColor
Gets or sets the gradient end colour drawn on a button the pointer is over.
ButtonHoverSelectedEndColor
Gets or sets the gradient end colour drawn when the pointer is over the selected button.
ButtonHoverSelectedStartColor
Gets or sets the gradient start colour drawn when the pointer is over the selected button.
ButtonHoverStartColor
Gets or sets the gradient start colour drawn on a button the pointer is over.
ButtonSelectedEndColor
Gets or sets the gradient end colour drawn on the selected button.
ButtonSelectedStartColor
Gets or sets the gradient start colour drawn on the selected button.
CollapseExpandButtonColor
Gets or sets the color of the Collapse/expand button.
ControlBorderStyle
Gets or sets the control's border style.
BorderStyle.ControlInCollapsedMode
Gets or sets whether the bar is collapsed to a narrow rail at its docked edge.
RenderInOutlookStyleExpandCollapseMode is true, which is also what puts the collapse button in the header. A request to collapse while that is off is ignored and this stays false. Nor does it collapse a bar whose Dock is Fill: the header button refuses one, since a bar that fills its container has nowhere to give the width back to. Setting it does not raise AboutToCollapseOrExpand or CollapseExpandButtonClicked; those report the user's click on the header button. This is runtime state, so the designer neither shows nor serialises it.CurrentlySelectedButton
Gets the currently selected/activated BinaryPanelBarButton.
CustomChevronImage
Gets or sets the custom Bitmap object for the control's chevron (i.e. the context menu button) image.
Bitmap object is set for this property, the control will use an internal (built-in) image for the context menu button.CustomImageTransparentColor
Gets or sets a transparency color for the custom image that is set in the control's property CustomChevronImage.
EndColor
Gets or sets the end color value to be used to draw the control's button objects when the control's XPThemeToEmulate value is set to None.
GripperColor
Gets or sets the gripper color.
XPThemeToEmulate property to None.GripperHeight
Gets or sets the control's gripper handle height.
HowManyPanelButtonsToShow
Gets or sets the number of BinaryPanelBarButton objects to display in this instance of BinaryPanelBar control.
ItemColorRenderingStyle
Gets or sets the rendering style for drawing the menu item selection rectangle area.
Items
Gets the list of all BinaryPanelBarButton objects that are currently hosted in this instance of BinaryPanelBar control.
LeftMarginForDrawingMainHeaderText
Gets or sets the left margin, when drawing the control's main header text.
MainHeaderHeight
Gets or sets the height of the control's main header strip, in logical (96 DPI) units.
MainHeaderTextFont instead, which is what it should have done all along: the font is in points and grows with the display, the strip was a flat twenty-five DEVICE pixels set once by the designer and never touched again, and at 250% that is a strip a third the height of its own text. Set a value here only to pin the strip to a size of your own. HANDOVER.md 3ac.MainHeaderTextColor
Gets or sets the the color for drawing the control's main header text.
MainHeaderTextFont
Gets or sets the Font to be used, when drawing the control's main header text.
PanelBarButtons
The panel bar's buttons, gathered from its child controls. The list is built on each read, so it is a snapshot rather than a live view.
PanelBarWindowFillColorWhenInCollapsedModeAndTheContainedPanelIsShowing
Gets or sets the fill color for the panel window, when the control is in collapsed mode and the contained panel for the current active panel window is showing .
Info.PanelBarWindowFillColorWhenInCollpasedMode
Gets or sets the fill color for the panel window, when the control is in collapsed mode.
Window.PanelBarWindowTextColorWhenInCollpasedMode
Gets or sets the fore color for the panel text that will be displayed, when the control is in the collapsed panel mode.
Highlight.PanelText
Gets or sets the text for the control's main heading area.
BinaryPanelBarButton's ButtonText property. But if you need to temporarily set the control's main heading area's text for any purpose, then you could use this property to set that text.
PanelWindowTextFontWhenInCollapsedMode
Gets or sets the font for the text that will be displayed in the collapsed panel window
PanelWindowTextWhenGripperIsOnMove
Gets or sets the text that will be displayed in the panel window, when the control is in collapsed mode and when the user is moving the gripper handle up/down.
ReflectCurrentXPThemeColorOnLoad
Gets or sets whether the control should paint itself based on the current active XP theme.
Every time the hosting container (i.e. a Form, etc.) is loaded, the control will draw itself with the relevant colors to simulate the current active XP theme.
The default value is false.
RenderInOutlookStyleExpandCollapseMode
Gets or sets whether to switch on / off the Outlook style expand/collapsing feature.
SelectedButton
Gets the currently selected BinaryPanelBarButton object.
ShouldAutoResetFocusToControlAfterPopupWindowHide
Gets or sets whether the control should automatically set the focus to itself soon after the user has hidden / dismissed the pop-up window when in collapsed mode.
Size
Provides a newer implementation.
StartColor
Gets or sets the start color value to be used to draw the control's button objects when the control's XPThemeToEmulate value is set to None.
TopMarginForDrawingMainHeaderText
Gets or sets the top margin, when drawing the control's main header text.
UpdateWhenSystemColorsChanges
Gets or sets whether the control needs to repaint itself when the SystemColorsChanged event is raised.
UseSolidBrushWhenPaintingButtons
Gets or sets whether to use a SolidBrush to paint the control and its button objects when the control's XPThemeToEmulate property is set to None value and valid start and end colors have been set.
WirePanelBarButtonClickEventToBaseBarButton
Gets or sets whether any click event handler that you have attached to the BinaryPanelBarButton object should be wired into the small / minimized "related" button (that sits in the base bar) click event.
XPThemeToEmulate
Gets or sets the XPTheme to be emulated when drawing this instance of the control.
Methods
AddBinaryPanelBarButton
A helper method to add a BinaryPanelBarButton object into this control's instance.
- tempObject
- A newly instantiated
BinaryPanelBarButtonobject.
DeSelectBinaryPanelBarButton
A helper method to deselect a particular (existing) BinaryPanelBarButton object from this control's instance.
- theObject
- An existing
BinaryPanelBarButtonobject instance.
DeSelectBinaryPanelBarButton
A helper method to deselect a particular (existing) BinaryPanelBarButton object from this control's instance.
- objectIndex
- The index of that particular
BinaryPanelBarButtonobject instance.
Dispose
Refer the base class documentation for this method.
- disposing
GetPanelButtonAt
A helper method to get an instance of BinaryPanelBarButton that is located at the specified coordinates.
- thePoint
- A specific location where to see if a valid instance of
BinaryPanelBarButtonexists.
Returns. If there is a valid BinaryPanelBarButton object at the given coordinates is available, then that particular object's instance is returned. Otherwise a null reference is returned.
ItemAt
Gets the instance of the BinaryPanelBarButton object that is at a specified index position in the collection of objects in this instance of BinaryPanelBar control.
- index
- The index of the
BinaryPanelBarButtonobject to retrieve.
MakeAvailableAllBinaryPanelBarButtonObjects
A helper method to "make available for use" all of the BinaryPanelBarButton objects that are currently in this instance of BinaryPanelBar control.
MakeAvailableForUseOnlyTheSpecifiedBinaryPanelBarButtons
A helper method to "make available for use", only a certain BinaryPanelBarButton objects.
- buttonObjects
- A list of
BinaryPanelBarButtonobjects to be "made available for use".
MoveDownByOneIndexTheSpecifiedBinaryPanelBarButtonObject
A helper method to move down in index, by one level, of the particular BinaryPanelBarButton object that is currently in the list of controls hosted by this instance of BinaryPanelBar control.
- theObject
- The particular
BinaryPanelBarButtonobject whose index needs to be re-set.
MoveUpByOneIndexTheSpecifiedBinaryPanelBarButtonObject
A helper method to move up in index, by one level, of the particular BinaryPanelBarButton object that is currently in the list of controls hosted by this instance of BinaryPanelBar control.
- theObject
- The particular
BinaryPanelBarButtonobject whose index needs to be re-set.
OnDockChanged
Raises the DockChanged event. BinaryPanelBar overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnHandleCreated
Refer to base class documentation.
OnMouseDown
Refer the base class documentation for this method.
OnPaint
Refer the base class documentation for this method.
OnResize
Refer the base class documentation for this method.
OnSizeChanged
Raises the SizeChanged event. BinaryPanelBar overrides it so the control's own handling runs alongside the base behavior.
- e
- The data for the event.
OnSystemColorsChanged
Refer to base class documentation.
- e
RemoveBinaryPanelBarButton
A helper method to remove a particular (existing) BinaryPanelBarButton object from this control's instance.
- tempObject
- An existing
BinaryPanelBarButtonobject.
RemoveBinaryPanelBarButton
A helper method to remove a particular (existing) BinaryPanelBarButton object from this control's instance.
- objectIndex
- The index of that particular
BinaryPanelBarButtonobject instance.
ResetAvailabilityStatusOfThePanelBarButtonObject
A helper method to reset the "availability for use" of a specified BinaryPanelBar object.
- theObject
- The
BinaryPanelBarButtoninstance that needs to be either "made available for use" or otherwise. - makeItAvailable
- True to make it available for use, false otherwise.
ResetIndexForTheSpecifiedBinaryPanelBarButtonObject
A helper method to reset the index of a particular BinaryPanelBarButton object.
- theObject
- The particular
BinaryPanelBarButtonobject whose index needs to be re-set. - newIndex
- The new desired index for the specified
BinaryPanelBarButtonobject instance.
SelectBinaryPanelBarButton
A helper method to select a particular (existing) BinaryPanelBarButton object in this control's instance.
- objectIndex
- The index of that particular
BinaryPanelBarButtonobject instance.
SelectBinaryPanelBarButton
A helper method to select a particular (existing) BinaryPanelBarButton object in this control's instance.
- theObject
- An existing valid
BinaryPanelBarButtonobject instance.
ShowSpecifiedBinaryPanelBarButtonsInMainViewList
A helper method to "make visible" a specific set of BinaryPanelBarButton objects that are currently in this instance of BinaryPanelBar control.
- theObjectsToShow
- An
ArrayListofBinaryPanelBarButtonobjects.
Events
AboutToCollapseOrExpand
Occurs when the control is about to collapse or expand.
BinaryPanelBarButtonClicked
This event is raised when a particular instance of BinaryPanelBarButton object is clicked.
BinaryPanelBarButtonContainedPanelAppliedOrChanged
This event is raised when a particular instance of BinaryPanelBarButton object's associated BinaryPanelBarContainedPanel object is changed via changing the ContainedPanel property.
BinaryPanelBarButtonImageChanged
This event is raised when a particular instance of BinaryPanelBarButton object's image is changed.
BinaryPanelBarButtonNotAvailableForUseChanged
This event is raised when a particular instance of BinaryPanelBarButton object is made unavailable for use (either by the user or programmatic).
BinaryPanelBarButtonNotAvailableForUseChanging
This event is raised when a particular instance of BinaryPanelBarButton object is about to be made unavailable for use (either by the user or programmatic).
BinaryPanelBarButtonTextChanged
This event is raised when a particular instance of BinaryPanelBarButton object's text is changed.
BinaryPanelBarButtonVisibleChanged
This event is raised when a particular instance of BinaryPanelBarButton object's visibility is changed.
CollapseExpandButtonClicked
Occurs when the BinaryPanelBar control's collapse / expand button is clicked.
GripperHandleMoved
This event is raised when the user moves the gripper handle (in the control) to hide/show BinaryPanelBarButton button objects that are currently available for use in the control.
XpThemeChanged
This event is raised when the control's XPThemeToEmulate property is changed.
XpThemeChanging
This event is raised when the control's XPThemeToEmulate property is about to be changed.