WinForms

Code Examples Upgrade Guide User Guide Demos Support Forums Download
  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class CommandBar

    Show / Hide Table of Contents

    Class CommandBar

    Implements a container for creating dockable toolbar, statusbar and rebar type controls.

    Inheritance
    System.Object
    CommandBar
    ControlBar
    CommandBarExt
    Implements
    IPopupParent
    IPopupItem
    ICommandBarDesignerInvoke
    ICommandBarDesignerMouseHook
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class CommandBar : Control, IPopupParent, IPopupItem, ICommandBarDesignerInvoke, ICommandBarDesignerMouseHook
    Remarks

    The CommandBar class is a part of the Essential Tools CommandBars framework and allows Windows Forms developers to add to their applications dockable command bars similar to those that are present in the Microsoft Visual Studio.NET and Office XP environments.

    The CommandBar, similar to to the MFC/Win32 control bars, is a container control that primarily serves as a host for some other Windows Forms control. The CommandBar class implements the hosting and layout logic while the contained control provides the functional significance.

    Constructors

    CommandBar()

    Creates a new instance of the CommandBar class.

    Declaration
    public CommandBar()

    Fields

    allowedBorders

    Declaration
    protected CommandBarDockBorder allowedBorders
    Field Value
    Type Description
    CommandBarDockBorder

    bBackColorSet

    Declaration
    protected bool bBackColorSet
    Field Value
    Type Description
    System.Boolean

    bDisableDocking

    Declaration
    protected bool bDisableDocking
    Field Value
    Type Description
    System.Boolean

    bDisableFloating

    Declaration
    protected bool bDisableFloating
    Field Value
    Type Description
    System.Boolean

    bDockModeWrapping

    Declaration
    protected bool bDockModeWrapping
    Field Value
    Type Description
    System.Boolean

    bDragging

    Declaration
    protected static bool bDragging
    Field Value
    Type Description
    System.Boolean

    bFireDockStateChanged

    Declaration
    protected bool bFireDockStateChanged
    Field Value
    Type Description
    System.Boolean

    bFloatModeWrapping

    Declaration
    protected bool bFloatModeWrapping
    Field Value
    Type Description
    System.Boolean

    bFullRow

    Declaration
    protected bool bFullRow
    Field Value
    Type Description
    System.Boolean

    bHideChevron

    Declaration
    protected bool bHideChevron
    Field Value
    Type Description
    System.Boolean

    bHideCloseButton

    Declaration
    protected bool bHideCloseButton
    Field Value
    Type Description
    System.Boolean

    bHideDropDown

    Declaration
    protected bool bHideDropDown
    Field Value
    Type Description
    System.Boolean

    bHideGripper

    Declaration
    protected bool bHideGripper
    Field Value
    Type Description
    System.Boolean

    bHideOnMouseUp

    Declaration
    protected static bool bHideOnMouseUp
    Field Value
    Type Description
    System.Boolean

    bLeadingEdge

    Declaration
    protected bool bLeadingEdge
    Field Value
    Type Description
    System.Boolean

    bRecalcNeeded

    Declaration
    protected bool bRecalcNeeded
    Field Value
    Type Description
    System.Boolean

    bRedockNeeded

    Declaration
    protected bool bRedockNeeded
    Field Value
    Type Description
    System.Boolean

    bRestrictedSizing

    Declaration
    protected bool bRestrictedSizing
    Field Value
    Type Description
    System.Boolean

    bShowDockModeText

    Declaration
    protected bool bShowDockModeText
    Field Value
    Type Description
    System.Boolean

    bTrailingEdge

    Declaration
    protected bool bTrailingEdge
    Field Value
    Type Description
    System.Boolean

    bUpdateOffsets

    Declaration
    protected bool bUpdateOffsets
    Field Value
    Type Description
    System.Boolean

    bVisibilitySetFlag

    Declaration
    protected bool bVisibilitySetFlag
    Field Value
    Type Description
    System.Boolean

    bVisible

    Declaration
    protected bool bVisible
    Field Value
    Type Description
    System.Boolean

    cbarDockState

    Declaration
    protected CommandBarDockState cbarDockState
    Field Value
    Type Description
    CommandBarDockState

    cbDockStateT

    Declaration
    protected CommandBarDockState cbDockStateT
    Field Value
    Type Description
    CommandBarDockState

    cbHilight

    Declaration
    protected CBButtons cbHilight
    Field Value
    Type Description
    CBButtons

    cdbParent

    Declaration
    protected CommandDockBar cdbParent
    Field Value
    Type Description
    CommandDockBar

    cdbParentDrag

    Declaration
    protected CommandDockBar cdbParentDrag
    Field Value
    Type Description
    CommandDockBar

    crDefault

    Declaration
    protected static Cursor crDefault
    Field Value
    Type Description
    System.Windows.Forms.Cursor

    ftFloatCaption

    Declaration
    protected static Font ftFloatCaption
    Field Value
    Type Description
    System.Drawing.Font

    nCommandBarHt

    Declaration
    protected int nCommandBarHt
    Field Value
    Type Description
    System.Int32

    nDefaultUnitHt

    Declaration
    protected static int nDefaultUnitHt
    Field Value
    Type Description
    System.Int32

    nGprCx

    Declaration
    protected int nGprCx
    Field Value
    Type Description
    System.Int32

    nGprXOff

    Declaration
    protected int nGprXOff
    Field Value
    Type Description
    System.Int32

    nGprYOff

    Declaration
    protected int nGprYOff
    Field Value
    Type Description
    System.Int32

    nIntegral

    Declaration
    protected int nIntegral
    Field Value
    Type Description
    System.Int32

    nMaxLength

    Declaration
    protected int nMaxLength
    Field Value
    Type Description
    System.Int32

    nMinLength

    Declaration
    protected int nMinLength
    Field Value
    Type Description
    System.Int32

    nRCCountDrag

    Declaration
    protected int nRCCountDrag
    Field Value
    Type Description
    System.Int32

    nRCIndex

    Declaration
    protected int nRCIndex
    Field Value
    Type Description
    System.Int32

    nRCIndexDrag

    Declaration
    protected int nRCIndexDrag
    Field Value
    Type Description
    System.Int32

    nRCIndexT

    Declaration
    protected int nRCIndexT
    Field Value
    Type Description
    System.Int32

    nRowOffsetDir

    Declaration
    protected int nRowOffsetDir
    Field Value
    Type Description
    System.Int32

    nRowOffsetDirT

    Declaration
    protected int nRowOffsetDirT
    Field Value
    Type Description
    System.Int32

    nRowOffsetDrag

    Declaration
    protected int nRowOffsetDrag
    Field Value
    Type Description
    System.Int32

    nRowOffsetInDir

    Declaration
    protected int nRowOffsetInDir
    Field Value
    Type Description
    System.Int32

    nRowOffsetInDirT

    Declaration
    protected int nRowOffsetInDirT
    Field Value
    Type Description
    System.Int32

    nSysInfoMenuFontHeight

    Declaration
    protected static int nSysInfoMenuFontHeight
    Field Value
    Type Description
    System.Int32

    ptDeltaOff

    Declaration
    protected static Point ptDeltaOff
    Field Value
    Type Description
    System.Drawing.Point

    ptMMWorkaround

    Declaration
    protected static Point ptMMWorkaround
    Field Value
    Type Description
    System.Drawing.Point

    pupMenu

    Declaration
    protected PopupMenu pupMenu
    Field Value
    Type Description
    PopupMenu

    rcFloat

    Declaration
    protected Rectangle rcFloat
    Field Value
    Type Description
    System.Drawing.Rectangle

    rMarker

    Declaration
    protected RowMarker rMarker
    Field Value
    Type Description
    RowMarker

    Properties

    AllowDrop

    Declaration
    public override bool AllowDrop { get; set; }
    Property Value
    Type Description
    System.Boolean

    AllowedDockBorders

    Gets / sets the edges of the Form along which the CommandBar may be docked.

    Declaration
    public CommandBarDockBorder AllowedDockBorders { get; set; }
    Property Value
    Type Description
    CommandBarDockBorder

    A CommandBarDockBorder value.

    AllowQuickCustomizing

    Gets value indicating whether quick customizing is allowed and dropdown arrow should be drawn.

    Declaration
    protected virtual bool AllowQuickCustomizing { get; }
    Property Value
    Type Description
    System.Boolean

    AlwaysLeadingEdge

    Indicates whether the CommandBar is always docked to the leading edge.

    Declaration
    public bool AlwaysLeadingEdge { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE to enforce leading edge docking. The default is FALSE.

    AlwaysTrailingEdge

    Indicates whether the CommandBar is always docked to the trailing edge.

    Declaration
    public bool AlwaysTrailingEdge { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE to enforce trailing edge docking. The default is FALSE.

    BackColor

    Declaration
    public override Color BackColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    CaptionHeight

    Declaration
    public static int CaptionHeight { get; }
    Property Value
    Type Description
    System.Int32

    CaptionRect

    Declaration
    protected virtual Rectangle CaptionRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    ChevronColor

    Gets or sets color for chevron.

    Declaration
    public Color ChevronColor { get; set; }
    Property Value
    Type Description
    System.Drawing.Color

    CloseButtonRect

    Declaration
    protected virtual Rectangle CloseButtonRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    Controller

    Declaration
    public CommandBarController Controller { get; set; }
    Property Value
    Type Description
    CommandBarController

    Cursor

    Declaration
    public override Cursor Cursor { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Cursor

    DesignProcess

    Declaration
    protected bool DesignProcess { get; }
    Property Value
    Type Description
    System.Boolean

    DisableDocking

    Indicates whether the CommandBar is allowed to dock.

    Declaration
    public bool DisableDocking { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE if docking is to be disallowed. The default is FALSE.

    DisableFloating

    Indicates whether the CommandBar is allowed to float.

    Declaration
    public bool DisableFloating { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE if floating is to be disallowed. The default is FALSE.

    DockModeWrapping

    Indicates whether the CommandBar should wrap when docked.

    Declaration
    public virtual bool DockModeWrapping { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE indicates that the CommandBar will wrap. The default is FALSE.

    Remarks

    Setting this property to TRUE will force a docked CommandBar to wrap when it's bounds are less than the MaxLength value.

    DockState

    Gets / sets the current dock or float state for the CommandBar.

    Declaration
    public CommandBarDockState DockState { get; set; }
    Property Value
    Type Description
    CommandBarDockState

    A CommandBarDockState value.

    DragStartRect

    Declaration
    protected virtual Rectangle DragStartRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    DropDownRect

    Declaration
    protected virtual Rectangle DropDownRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    Enabled

    Declaration
    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    FloatBounds

    Gets / sets the bounds of a floating CommandBar.

    Declaration
    public Rectangle FloatBounds { get; set; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    A Rectangle value that represents the float bounds of the CommandBar.

    Floating

    Returns the current dock/float state of the CommandBar.

    Declaration
    public bool Floating { get; }
    Property Value
    Type Description
    System.Boolean

    TRUE if the CommandBar is floating.

    FloatModeWrapping

    Indicates whether the CommandBar should wrap when floating.

    Declaration
    public virtual bool FloatModeWrapping { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE indicates that the CommandBar will wrap. The default is FALSE.

    Remarks

    Setting this property to TRUE will force a floating CommandBar to wrap when it's bounds are less than the MaxLength value.

    Font

    Gets / sets the font used to display text in the control.

    Declaration
    public Font Font { get; set; }
    Property Value
    Type Description
    System.Drawing.Font

    A Font object.

    FormMinWidth

    Declaration
    public static int FormMinWidth { get; }
    Property Value
    Type Description
    System.Int32

    GripperRect

    Declaration
    protected virtual Rectangle GripperRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    HasExternalPopupMenu

    Declaration
    protected virtual bool HasExternalPopupMenu { get; }
    Property Value
    Type Description
    System.Boolean

    HideChevron

    Indicates whether the CommandBar should be drawn without a chevron.

    Declaration
    public virtual bool HideChevron { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE if the chevron is to be hidden. The default is FALSE.

    Remarks

    When a docked CommandBar is sized less than the MaxLength value, a chevron will normally be displayed on it's trailing edge.

    HideCloseButton

    Indicates whether the CommandBar will have a close button when floating.

    Declaration
    public bool HideCloseButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE if the close button is to be hidden. The default is FALSE.

    HideDropDownButton

    Indicates whether the CommandBar's dropdown button should be hidden.

    Declaration
    public bool HideDropDownButton { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE if the dropdown button is to be hidden. The default is FALSE.

    HideGripper

    Indicates whether the CommandBar's positioning gripper should be hidden.

    Declaration
    public bool HideGripper { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE if the gripper is to be hidden. The default is FALSE.

    IntegralHeight

    Gets / sets the incremental step by which the CommandBar's lateral dimension increases when wrapped.

    Declaration
    public virtual int IntegralHeight { get; set; }
    Property Value
    Type Description
    System.Int32

    An integer value representing the incremental height.

    IsChevronVisible

    Indicates whether the chevron is currently displayed.

    Declaration
    public bool IsChevronVisible { get; }
    Property Value
    Type Description
    System.Boolean

    TRUE if the chevron is visible; FALSE otherwise

    IsCustomizing

    Declaration
    protected bool IsCustomizing { get; }
    Property Value
    Type Description
    System.Boolean

    IsDragging

    Declaration
    public static bool IsDragging { get; }
    Property Value
    Type Description
    System.Boolean

    Location

    Declaration
    public Point Location { get; set; }
    Property Value
    Type Description
    System.Drawing.Point

    MaxLength

    Gets / sets the maximum(ideal) linear dimension of the CommandBar.

    Declaration
    public virtual int MaxLength { get; set; }
    Property Value
    Type Description
    System.Int32

    An integer value representing the ideal length.

    MinHeight

    Gets / sets the ideal lateral dimension of the CommandBar.

    Declaration
    public virtual int MinHeight { get; set; }
    Property Value
    Type Description
    System.Int32

    An integer value representing the minimum height.

    MinLength

    Gets / sets the minimum linear dimension of the CommandBar.

    Declaration
    public virtual int MinLength { get; set; }
    Property Value
    Type Description
    System.Int32

    An integer value representing the minimum length.

    nHeaderOff

    Declaration
    protected virtual int nHeaderOff { get; }
    Property Value
    Type Description
    System.Int32

    nTrailBtnOff

    Declaration
    protected virtual int nTrailBtnOff { get; }
    Property Value
    Type Description
    System.Int32

    OccupyFullRow

    Indicates whether the CommandBar should occupy the entire row when docked.

    Declaration
    public virtual bool OccupyFullRow { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE indicates that the CommandBar will occupy the entire row. The default is FALSE.

    PopupContainer

    Gets / sets the PopupContainer control to be displayed when the dropdown button is clicked.

    Declaration
    public PopupControlContainer PopupContainer { get; set; }
    Property Value
    Type Description
    PopupControlContainer

    An instance of the PopupControlContainer class.

    PopupMenu

    Gets / sets the PopupMenu to be displayed when the dropdown button is clicked.

    Declaration
    public PopupMenu PopupMenu { get; set; }
    Property Value
    Type Description
    PopupMenu

    An instance of the PopupMenu class.

    RowIndex

    Gets / sets the index of the row/column for the CommandBar.

    Declaration
    public int RowIndex { get; set; }
    Property Value
    Type Description
    System.Int32

    A zero-based integer value representing the row index.

    RowOffset

    Gets / sets the linear offset of the CommandBar within a row.

    Declaration
    public virtual int RowOffset { get; set; }
    Property Value
    Type Description
    System.Int32

    An integer value representing the row offset.

    ShowDockModeText

    Indicates whether the text caption should be displayed on a docked CommandBar.

    Declaration
    public virtual bool ShowDockModeText { get; set; }
    Property Value
    Type Description
    System.Boolean

    TRUE if the text is to be displayed. The default is TRUE.

    Size

    Declaration
    public Size Size { get; set; }
    Property Value
    Type Description
    System.Drawing.Size

    UseBackwardCompatiblity

    Declaration
    public virtual bool UseBackwardCompatiblity { get; set; }
    Property Value
    Type Description
    System.Boolean

    VBounds

    Returns the Virtual Bounds property - used for layout.

    Declaration
    protected Rectangle VBounds { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle

    Visible

    Declaration
    public virtual bool Visible { get; set; }
    Property Value
    Type Description
    System.Boolean

    VLeft

    Gets / sets the Virtual Left property - used for layout.

    Declaration
    protected int VLeft { get; set; }
    Property Value
    Type Description
    System.Int32

    VLocation

    Gets / sets the Virtual Location property - used for layout.

    Declaration
    protected Point VLocation { get; set; }
    Property Value
    Type Description
    System.Drawing.Point

    VRight

    Gets / sets the Virtual Right property - used for layout.

    Declaration
    protected int VRight { get; }
    Property Value
    Type Description
    System.Int32

    Methods

    AdjustChildControlBounds(ref Rectangle)

    Declaration
    protected virtual void AdjustChildControlBounds(ref Rectangle childBounds)
    Parameters
    Type Name Description
    System.Drawing.Rectangle childBounds

    AdjustRowOffsetsInParentDockBar()

    Declaration
    protected void AdjustRowOffsetsInParentDockBar()

    CalcChildControlBounds(Size)

    Declaration
    protected Rectangle CalcChildControlBounds(Size szbar)
    Parameters
    Type Name Description
    System.Drawing.Size szbar
    Returns
    Type Description
    System.Drawing.Rectangle

    CalcChildControlBounds(Size, CommandBarDockState)

    Calculates the client control bounds for the specified CommandBar size and dock position.

    Declaration
    public Rectangle CalcChildControlBounds(Size szbar, CommandBarDockState cdb)
    Parameters
    Type Name Description
    System.Drawing.Size szbar

    The CommandBar size .

    CommandBarDockState cdb

    A CommandBarDockState value.

    Returns
    Type Description
    System.Drawing.Rectangle

    The client control bounds.

    CalcCommandBarMaxLength(Int32)

    Calculates the CommandBar's maximum length for the specified client width.

    Declaration
    public virtual int CalcCommandBarMaxLength(int nctrlwidth)
    Parameters
    Type Name Description
    System.Int32 nctrlwidth

    The client control width.

    Returns
    Type Description
    System.Int32

    The maximum length estimate.

    CalcTextLength(CommandBarDockState, Boolean)

    Declaration
    protected SizeF CalcTextLength(CommandBarDockState cdb, bool bmaxlength)
    Parameters
    Type Name Description
    CommandBarDockState cdb
    System.Boolean bmaxlength
    Returns
    Type Description
    System.Drawing.SizeF

    CalculateFloatingSize()

    Gets the size of the floating bar.

    Declaration
    protected virtual Size CalculateFloatingSize()
    Returns
    Type Description
    System.Drawing.Size

    ChangeCommandBarOrientation()

    Changes the command bar orientation.

    Declaration
    protected virtual void ChangeCommandBarOrientation()

    ChildClosing(IPopupChild, PopupCloseType)

    Declaration
    public virtual void ChildClosing(IPopupChild childUI, PopupCloseType popupCloseType)
    Parameters
    Type Name Description
    IPopupChild childUI
    PopupCloseType popupCloseType

    childctrl_ControlAdded(Object, ControlEventArgs)

    Declaration
    protected void childctrl_ControlAdded(object sender, ControlEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.Windows.Forms.ControlEventArgs e

    childctrl_ControlRemoved(Object, ControlEventArgs)

    Declaration
    protected void childctrl_ControlRemoved(object sender, ControlEventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.Windows.Forms.ControlEventArgs e

    childctrl_GotFocus(Object, EventArgs)

    Declaration
    protected void childctrl_GotFocus(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    childctrl_LostFocus(Object, EventArgs)

    Declaration
    protected void childctrl_LostFocus(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    CreateAccessibilityInstance()

    Declaration
    protected override AccessibleObject CreateAccessibilityInstance()
    Returns
    Type Description
    System.Windows.Forms.AccessibleObject

    CreateFloatingForm()

    Declaration
    protected virtual CommandBarForm CreateFloatingForm()
    Returns
    Type Description
    CommandBarForm

    Dispose(Boolean)

    Overridden. See System.Windows.Forms.Control.Dispose(System.Boolean).

    Declaration
    protected override void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    DockToParent()

    Declaration
    protected virtual void DockToParent()

    EnterFloatMode(Point)

    Declaration
    protected virtual void EnterFloatMode(Point ptscreen)
    Parameters
    Type Name Description
    System.Drawing.Point ptscreen

    FireCommandBarStateChanged(EventArgs)

    Declaration
    protected void FireCommandBarStateChanged(EventArgs args)
    Parameters
    Type Name Description
    System.EventArgs args

    FireCommandBarStateChanging(CommandBarStateChangingEventArgs)

    Declaration
    protected void FireCommandBarStateChanging(CommandBarStateChangingEventArgs args)
    Parameters
    Type Name Description
    CommandBarStateChangingEventArgs args

    GetAdjustedSize(Size, Size)

    Declaration
    protected Size GetAdjustedSize(Size szmaxctrl, Size szproposedctrl)
    Parameters
    Type Name Description
    System.Drawing.Size szmaxctrl
    System.Drawing.Size szproposedctrl
    Returns
    Type Description
    System.Drawing.Size

    GetBorderOverlapCue(PopupRelativeAlignment)

    Declaration
    public virtual Point[] GetBorderOverlapCue(PopupRelativeAlignment rAlign)
    Parameters
    Type Name Description
    PopupRelativeAlignment rAlign
    Returns
    Type Description
    System.Drawing.Point[]

    GetCloseButtonState()

    Gets visual state for close button of the floating CommandBar.

    Declaration
    public CBButtonState GetCloseButtonState()
    Returns
    Type Description
    CBButtonState

    GetDockWrapSize(Size)

    Declaration
    protected virtual Size GetDockWrapSize(Size szbounds)
    Parameters
    Type Name Description
    System.Drawing.Size szbounds
    Returns
    Type Description
    System.Drawing.Size

    GetDropDownRect()

    Declaration
    protected virtual Rectangle GetDropDownRect()
    Returns
    Type Description
    System.Drawing.Rectangle

    GetDropDownState()

    Gets visual state for DropDown button.

    Declaration
    public CBButtonState GetDropDownState()
    Returns
    Type Description
    CBButtonState

    GetFirstAlignPreference()

    Declaration
    protected virtual PopupRelativeAlignment GetFirstAlignPreference()
    Returns
    Type Description
    PopupRelativeAlignment

    GetFloatinCaptionFont()

    Gets font for caption of the floating CommandBar.

    Declaration
    protected Font GetFloatinCaptionFont()
    Returns
    Type Description
    System.Drawing.Font

    GetFloatingTextRectangle()

    Gets rectangle for display text of the floating CommandBar.

    Declaration
    protected Rectangle GetFloatingTextRectangle()
    Returns
    Type Description
    System.Drawing.Rectangle

    GetFloatWrapSize(Size, CommandBarResizeType)

    Declaration
    protected virtual Size GetFloatWrapSize(Size szbounds, CommandBarResizeType rtsize)
    Parameters
    Type Name Description
    System.Drawing.Size szbounds
    CommandBarResizeType rtsize
    Returns
    Type Description
    System.Drawing.Size

    GetLocationForPopupAlignment(PopupRelativeAlignment, out PopupRelativeAlignment)

    Declaration
    public virtual Point GetLocationForPopupAlignment(PopupRelativeAlignment prevAlign, out PopupRelativeAlignment newAlign)
    Parameters
    Type Name Description
    PopupRelativeAlignment prevAlign
    PopupRelativeAlignment newAlign
    Returns
    Type Description
    System.Drawing.Point

    GetPopupParentControl()

    Declaration
    public virtual Control GetPopupParentControl()
    Returns
    Type Description
    System.Windows.Forms.Control

    GetTextRectangle()

    Gets rectangle for display text of the docked CommandBar.

    Declaration
    protected virtual Rectangle GetTextRectangle()
    Returns
    Type Description
    System.Drawing.Rectangle

    HandleDoubleClick(Point)

    Declaration
    public void HandleDoubleClick(Point ptscreen)
    Parameters
    Type Name Description
    System.Drawing.Point ptscreen

    HandleMouseDown(MouseButtons, Point)

    Handles the mouse down event.

    Declaration
    public virtual void HandleMouseDown(MouseButtons button, Point ptscreen)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseButtons button
    System.Drawing.Point ptscreen

    HandleMouseLeave()

    Declaration
    public virtual void HandleMouseLeave()

    HandleMouseMove(MouseButtons, Point)

    Declaration
    public virtual void HandleMouseMove(MouseButtons button, Point ptscreen)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseButtons button
    System.Drawing.Point ptscreen

    HandleMouseUp(MouseButtons, Point)

    Declaration
    public virtual void HandleMouseUp(MouseButtons button, Point ptscreen)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseButtons button
    System.Drawing.Point ptscreen

    HideDropDown()

    Declaration
    protected virtual void HideDropDown()

    InitializeCommandBar()

    Declaration
    protected virtual void InitializeCommandBar()

    InitializeFloatCaptionFont()

    Declaration
    protected static void InitializeFloatCaptionFont()

    InitiateFloatingResize(Point, Int32)

    Declaration
    public void InitiateFloatingResize(Point ptscreen, int nchittest)
    Parameters
    Type Name Description
    System.Drawing.Point ptscreen
    System.Int32 nchittest

    IsRelatedControl(Control, Boolean)

    Declaration
    public virtual bool IsRelatedControl(Control control, bool askPopupParent)
    Parameters
    Type Name Description
    System.Windows.Forms.Control control
    System.Boolean askPopupParent
    Returns
    Type Description
    System.Boolean

    IsShowChevron()

    Indicates whether the chevron must be displayed.

    Declaration
    protected bool IsShowChevron()
    Returns
    Type Description
    System.Boolean

    IsShowingDropDown()

    Declaration
    protected virtual bool IsShowingDropDown()
    Returns
    Type Description
    System.Boolean

    IsShowText()

    Indicates whether the text must be displayed.

    Declaration
    protected bool IsShowText()
    Returns
    Type Description
    System.Boolean

    MenuColorsChanged(Object, EventArgs)

    Declaration
    public virtual void MenuColorsChanged(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    OnCommandBarDropDownClicked(EventArgs)

    Raises the CommandBarDropDownClicked event.

    Declaration
    protected virtual void OnCommandBarDropDownClicked(EventArgs arg)
    Parameters
    Type Name Description
    System.EventArgs arg

    An System.EventArgs value that contains the event data.

    OnCommandBarStateChanged(EventArgs)

    Raises the CommandBarStateChanged event.

    Declaration
    protected virtual void OnCommandBarStateChanged(EventArgs arg)
    Parameters
    Type Name Description
    System.EventArgs arg

    An System.EventArgs value that contains the event data.

    OnCommandBarStateChanging(CommandBarStateChangingEventArgs)

    Raises the CommandBarStateChanging event.

    Declaration
    protected virtual void OnCommandBarStateChanging(CommandBarStateChangingEventArgs arg)
    Parameters
    Type Name Description
    CommandBarStateChangingEventArgs arg

    A CommandBarStateChanging value that contains the event data.

    OnCommandBarUserClosed(EventArgs)

    Raises the CommandBarUserClosed event.

    Declaration
    protected virtual void OnCommandBarUserClosed(EventArgs arg)
    Parameters
    Type Name Description
    System.EventArgs arg

    An System.EventArgs value that contains the event data.

    OnCommandBarWrapping(CommandBarWrappingEventArgs)

    Raises the CommandBarWrapping event.

    Declaration
    protected virtual void OnCommandBarWrapping(CommandBarWrappingEventArgs arg)
    Parameters
    Type Name Description
    CommandBarWrappingEventArgs arg

    A CommandBarWrappingEventArgs value that contains the event data.

    OnControlAdded(ControlEventArgs)

    Overridden. See System.Windows.Forms.Control.OnControlAdded(System.Windows.Forms.ControlEventArgs).

    Declaration
    protected override void OnControlAdded(ControlEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlEventArgs e

    OnControlRemoved(ControlEventArgs)

    Overridden. See System.Windows.Forms.Control.OnControlRemoved(System.Windows.Forms.ControlEventArgs).

    Declaration
    protected override void OnControlRemoved(ControlEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.ControlEventArgs e

    OnDoubleClick(EventArgs)

    Overridden. See System.Windows.Forms.Control.OnDoubleClick(System.EventArgs).

    Declaration
    protected override void OnDoubleClick(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnMouseDown(MouseEventArgs)

    Overridden. See System.Windows.Forms.Control.OnMouseDown(System.Windows.Forms.MouseEventArgs).

    Declaration
    protected override void OnMouseDown(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnMouseLeave(EventArgs)

    Overridden. See System.Windows.Forms.Control.OnMouseLeave(System.EventArgs).

    Declaration
    protected override void OnMouseLeave(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnMouseMove(MouseEventArgs)

    Overridden. See System.Windows.Forms.Control.OnMouseMove(System.Windows.Forms.MouseEventArgs).

    Declaration
    protected override void OnMouseMove(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnMouseUp(MouseEventArgs)

    Overridden. See System.Windows.Forms.Control.OnMouseUp(System.Windows.Forms.MouseEventArgs).

    Declaration
    protected override void OnMouseUp(MouseEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.MouseEventArgs e

    OnPaint(PaintEventArgs)

    Overridden. See System.Windows.Forms.Control.OnPaint(System.Windows.Forms.PaintEventArgs).

    Declaration
    protected override void OnPaint(PaintEventArgs e)
    Parameters
    Type Name Description
    System.Windows.Forms.PaintEventArgs e

    OnPopupClosed(Object, EventArgs)

    Declaration
    protected virtual void OnPopupClosed(object sender, EventArgs e)
    Parameters
    Type Name Description
    System.Object sender
    System.EventArgs e

    OnRightToLeftChanged(EventArgs)

    Declaration
    protected override void OnRightToLeftChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnSystemColorsChanged(EventArgs)

    Overridden. See System.Windows.Forms.Control.OnSystemColorsChanged(System.EventArgs).

    Declaration
    protected override void OnSystemColorsChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnTextChanged(EventArgs)

    Declaration
    protected override void OnTextChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    OnVisibleChanged(EventArgs)

    Declaration
    protected override void OnVisibleChanged(EventArgs e)
    Parameters
    Type Name Description
    System.EventArgs e

    RecalcIfNeeded()

    Declaration
    protected virtual void RecalcIfNeeded()

    RecSubscribeChildControlEvents(Control, Boolean)

    Declaration
    public void RecSubscribeChildControlEvents(Control ctrl, bool subscribe)
    Parameters
    Type Name Description
    System.Windows.Forms.Control ctrl
    System.Boolean subscribe

    RedockIfNeeded()

    Declaration
    protected virtual void RedockIfNeeded()

    ResetBackColor()

    Declaration
    public override void ResetBackColor()

    ResetCursor()

    Declaration
    public override void ResetCursor()

    ResetFont()

    Resets the Font property to it's default value.

    Declaration
    public override void ResetFont()

    ResetTempDefaults()

    Declaration
    protected void ResetTempDefaults()

    SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)

    Overridden. See System.Windows.Forms.Control.SetBoundsCore(System.Int32,System.Int32,System.Int32,System.Int32,System.Windows.Forms.BoundsSpecified).

    Declaration
    protected override void SetBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
    Parameters
    Type Name Description
    System.Int32 x
    System.Int32 y
    System.Int32 width
    System.Int32 height
    System.Windows.Forms.BoundsSpecified specified

    SetChildControlBounds()

    Declaration
    protected virtual void SetChildControlBounds()

    SetCommandBarBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)

    Declaration
    protected virtual void SetCommandBarBoundsCore(int x, int y, int width, int height, BoundsSpecified specified)
    Parameters
    Type Name Description
    System.Int32 x
    System.Int32 y
    System.Int32 width
    System.Int32 height
    System.Windows.Forms.BoundsSpecified specified

    SetCommandBarSize(Int32, Int32)

    Declaration
    protected bool SetCommandBarSize(int nwidth, int nheight)
    Parameters
    Type Name Description
    System.Int32 nwidth
    System.Int32 nheight
    Returns
    Type Description
    System.Boolean

    SetRenderer()

    Sets renderer for CommandBar.

    Declaration
    protected virtual void SetRenderer()

    ShouldCreateNewRow()

    Declaration
    protected bool ShouldCreateNewRow()
    Returns
    Type Description
    System.Boolean

    ShouldDrawThemed()

    Declaration
    protected virtual bool ShouldDrawThemed()
    Returns
    Type Description
    System.Boolean

    ShouldSerializeBackColor()

    Declaration
    protected bool ShouldSerializeBackColor()
    Returns
    Type Description
    System.Boolean

    ShouldSerializeCursor()

    Declaration
    protected bool ShouldSerializeCursor()
    Returns
    Type Description
    System.Boolean

    ShouldSerializeFloatBounds()

    Declaration
    protected bool ShouldSerializeFloatBounds()
    Returns
    Type Description
    System.Boolean

    ShouldSerializeFont()

    Declaration
    protected bool ShouldSerializeFont()
    Returns
    Type Description
    System.Boolean

    ShouldSerializeRowIndex()

    Declaration
    protected bool ShouldSerializeRowIndex()
    Returns
    Type Description
    System.Boolean

    ShouldSerializeRowOffset()

    Declaration
    protected bool ShouldSerializeRowOffset()
    Returns
    Type Description
    System.Boolean

    ShowDropDown()

    Declaration
    protected virtual bool ShowDropDown()
    Returns
    Type Description
    System.Boolean

    Events

    CommandBarDropDownClicked

    Occurs when the dropdown button on a CommandBar is clicked.

    Declaration
    public event EventHandler CommandBarDropDownClicked
    Event Type
    Type Description
    System.EventHandler
    Remarks

    The CommandBarDropDownClicked event is fired when the dropdown button on a CommandBar is clicked.

    CommandBarStateChanged

    Occurs after a CommandBar's dock/float state changes.

    Declaration
    public event EventHandler CommandBarStateChanged
    Event Type
    Type Description
    System.EventHandler
    Remarks

    The CommandBarStateChanged event is fired after a CommandBar's dock/float state changes. Handle this event to perform any custom processing required after a state change.

    See Also
    CommandBarStateChanging

    CommandBarStateChanging

    Occurs when a CommandBar's dock/float state is about to change.

    Declaration
    public event CommandBarStateChangingEventHandler CommandBarStateChanging
    Event Type
    Type Description
    CommandBarStateChangingEventHandler
    Remarks

    The CommandBarStateChanging event is fired before a CommandBar's dock/float state changes. Handle this event to perform any custom processing before state changes. CommandBarStateChangingEventHandler and CommandBarStateChangingEventArgs

    See Also
    CommandBarStateChanged

    CommandBarUserClosed

    Occurs when a floating CommandBar is hidden by the user.

    Declaration
    public event EventHandler CommandBarUserClosed
    Event Type
    Type Description
    System.EventHandler
    Remarks

    The CommandBarUserClosed event occurs when a floating CommandBar is hidden as a result of the user clicking the close button.

    CommandBarWrapping

    Occurs when the CommandBar is being wrapped.

    Declaration
    public event CommandBarWrappingEventHandler CommandBarWrapping
    Event Type
    Type Description
    CommandBarWrappingEventHandler
    Remarks

    The CommandBarWrapping event is fired whenever the CommandBar is in the process of being wrapped. Handle this event for customizing the resizing/wrapping behavior of the CommandBar.

    See CommandBarWrappingEventHandler and CommandBarWrappingEventArgs for more information.

    Explicit Interface Implementations

    IPopupParent.IsRightToLeft

    Declaration
    bool IPopupParent.IsRightToLeft { get; }
    Returns
    Type Description
    System.Boolean

    ICommandBarDesignerInvoke.CommandBarBaseVisibility

    Declaration
    bool ICommandBarDesignerInvoke.CommandBarBaseVisibility { get; set; }
    Returns
    Type Description
    System.Boolean

    ICommandBarDesignerInvoke.GetCommandDockBarParent()

    Declaration
    CommandDockBar ICommandBarDesignerInvoke.GetCommandDockBarParent()
    Returns
    Type Description
    CommandDockBar

    ICommandBarDesignerInvoke.SetChildControlBounds()

    Declaration
    void ICommandBarDesignerInvoke.SetChildControlBounds()

    Implements

    IPopupParent
    IPopupItem
    ICommandBarDesignerInvoke
    ICommandBarDesignerMouseHook

    See Also

    CommandBarController
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved