WinForms

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

    Show / Hide Table of Contents

    Class ControlBar

    A ControlBar is a specialized implementation of the CommandBar class that is used for hosting controls within the Essential Tools XPMenus Framework. A ControlBar can contain two controls - the main control that occupies the ControlBar's client region and optionally, a CaptionControl that is displayed within the ControlBar's caption region. While just about any System.Windows.Forms.Control instance can be used as the ControlBar's main client, the caption control position is normally occupied by single line controls such as a ToolBar, TextBox or ComboBox. ControlBars thus function as full-featured docking windows that can be docked along the host form's borders or floated as top-level windows, while following the layout limitations of the XPMenus toolbars. Examples of the ControlBar concept include the Microsoft Office 2003 TaskPane window.

    ControlBars are supported through the XPMenus framework and can be added to any form that has been initialized with a MainFrameBarManager. Invoking the MainFrameBarManager's AddControlBar design-time verb will create a new ControlBar and add it to the form. Dropping a control onto the ControlBar sets it as the ControlBar's main client. To assign the caption control, drop control onto the ControlBar and set the CaptionControl to reference it.

    Inheritance
    System.Object
    CommandBar
    ControlBar
    Implements
    IPopupParent
    IPopupItem
    ICommandBarDesignerInvoke
    ICommandBarDesignerMouseHook
    Inherited Members
    CommandBar.nGprXOff
    CommandBar.nGprYOff
    CommandBar.nGprCx
    CommandBar.bRedockNeeded
    CommandBar.bRecalcNeeded
    CommandBar.bFireDockStateChanged
    CommandBar.bHideGripper
    CommandBar.bDockModeWrapping
    CommandBar.bFloatModeWrapping
    CommandBar.bShowDockModeText
    CommandBar.bHideChevron
    CommandBar.bHideDropDown
    CommandBar.bHideCloseButton
    CommandBar.bFullRow
    CommandBar.bDisableFloating
    CommandBar.bDisableDocking
    CommandBar.nMaxLength
    CommandBar.nMinLength
    CommandBar.nDefaultUnitHt
    CommandBar.nCommandBarHt
    CommandBar.nIntegral
    CommandBar.bLeadingEdge
    CommandBar.bTrailingEdge
    CommandBar.allowedBorders
    CommandBar.ftFloatCaption
    CommandBar.cdbParent
    CommandBar.cbarDockState
    CommandBar.nRowOffsetDir
    CommandBar.nRowOffsetInDir
    CommandBar.nRCIndex
    CommandBar.bVisible
    CommandBar.bVisibilitySetFlag
    CommandBar.rcFloat
    CommandBar.cbDockStateT
    CommandBar.nRowOffsetDirT
    CommandBar.nRowOffsetInDirT
    CommandBar.nRCIndexT
    CommandBar.cdbParentDrag
    CommandBar.nRowOffsetDrag
    CommandBar.nRCIndexDrag
    CommandBar.nRCCountDrag
    CommandBar.cbHilight
    CommandBar.bDragging
    CommandBar.ptDeltaOff
    CommandBar.ptMMWorkaround
    CommandBar.crDefault
    CommandBar.bHideOnMouseUp
    CommandBar.bBackColorSet
    CommandBar.bUpdateOffsets
    CommandBar.bRestrictedSizing
    CommandBar.rMarker
    CommandBar.nSysInfoMenuFontHeight
    CommandBar.pupMenu
    CommandBar.ShouldSerializeFloatBounds()
    CommandBar.ShouldDrawThemed()
    CommandBar.GetDropDownRect()
    CommandBar.GetDropDownState()
    CommandBar.GetCloseButtonState()
    CommandBar.GetFloatingTextRectangle()
    CommandBar.GetFloatinCaptionFont()
    CommandBar.IsShowChevron()
    CommandBar.IsShowText()
    CommandBar.ShouldSerializeRowOffset()
    CommandBar.ShouldSerializeRowIndex()
    CommandBar.ResetBackColor()
    CommandBar.ShouldSerializeBackColor()
    CommandBar.ShouldSerializeFont()
    CommandBar.ResetFont()
    CommandBar.ShouldSerializeCursor()
    CommandBar.ResetCursor()
    CommandBar.CalcChildControlBounds(Size)
    CommandBar.CalcCommandBarMaxLength(Int32)
    CommandBar.CalcChildControlBounds(Size, CommandBarDockState)
    CommandBar.ResetTempDefaults()
    CommandBar.RedockIfNeeded()
    CommandBar.RecalcIfNeeded()
    CommandBar.ShouldCreateNewRow()
    CommandBar.AdjustRowOffsetsInParentDockBar()
    CommandBar.GetDockWrapSize(Size)
    CommandBar.GetFloatWrapSize(Size, CommandBarResizeType)
    CommandBar.SetCommandBarSize(Int32, Int32)
    CommandBar.GetAdjustedSize(Size, Size)
    CommandBar.CalcTextLength(CommandBarDockState, Boolean)
    CommandBar.SetCommandBarBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
    CommandBar.AdjustChildControlBounds(Rectangle)
    CommandBar.EnterFloatMode(Point)
    CommandBar.CreateFloatingForm()
    CommandBar.CreateAccessibilityInstance()
    CommandBar.GetPopupParentControl()
    CommandBar.IsRelatedControl(Control, Boolean)
    CommandBar.IsShowingDropDown()
    CommandBar.ShowDropDown()
    CommandBar.HideDropDown()
    CommandBar.OnVisibleChanged(EventArgs)
    CommandBar.OnTextChanged(EventArgs)
    CommandBar.OnControlAdded(ControlEventArgs)
    CommandBar.RecSubscribeChildControlEvents(Control, Boolean)
    CommandBar.childctrl_GotFocus(Object, EventArgs)
    CommandBar.childctrl_LostFocus(Object, EventArgs)
    CommandBar.childctrl_ControlAdded(Object, ControlEventArgs)
    CommandBar.childctrl_ControlRemoved(Object, ControlEventArgs)
    CommandBar.OnSystemColorsChanged(EventArgs)
    CommandBar.MenuColorsChanged(Object, EventArgs)
    CommandBar.OnCommandBarWrapping(CommandBarWrappingEventArgs)
    CommandBar.OnCommandBarDropDownClicked(EventArgs)
    CommandBar.FireCommandBarStateChanging(CommandBarStateChangingEventArgs)
    CommandBar.FireCommandBarStateChanged(EventArgs)
    CommandBar.OnCommandBarStateChanging(CommandBarStateChangingEventArgs)
    CommandBar.OnCommandBarStateChanged(EventArgs)
    CommandBar.OnCommandBarUserClosed(EventArgs)
    CommandBar.OnPopupClosed(Object, EventArgs)
    CommandBar.InitializeFloatCaptionFont()
    CommandBar.InitiateFloatingResize(Point, Int32)
    CommandBar.OnMouseDown(MouseEventArgs)
    CommandBar.OnMouseMove(MouseEventArgs)
    CommandBar.OnMouseUp(MouseEventArgs)
    CommandBar.OnDoubleClick(EventArgs)
    CommandBar.OnMouseLeave(EventArgs)
    CommandBar.SetBoundsCore(Int32, Int32, Int32, Int32, BoundsSpecified)
    CommandBar.OnRightToLeftChanged(EventArgs)
    CommandBar.ICommandBarDesignerInvoke.SetChildControlBounds()
    CommandBar.ICommandBarDesignerInvoke.GetCommandDockBarParent()
    CommandBar.ChildClosing(IPopupChild, PopupCloseType)
    CommandBar.GetBorderOverlapCue(PopupRelativeAlignment)
    CommandBar.GetLocationForPopupAlignment(PopupRelativeAlignment, PopupRelativeAlignment)
    CommandBar.HandleDoubleClick(Point)
    CommandBar.DockToParent()
    CommandBar.HandleMouseLeave()
    CommandBar.CaptionHeight
    CommandBar.FormMinWidth
    CommandBar.nHeaderOff
    CommandBar.nTrailBtnOff
    CommandBar.HasExternalPopupMenu
    CommandBar.Controller
    CommandBar.DockState
    CommandBar.AllowedDockBorders
    CommandBar.RowIndex
    CommandBar.UseBackwardCompatiblity
    CommandBar.Visible
    CommandBar.HideGripper
    CommandBar.ChevronColor
    CommandBar.HideDropDownButton
    CommandBar.HideCloseButton
    CommandBar.Floating
    CommandBar.FloatBounds
    CommandBar.DisableFloating
    CommandBar.DisableDocking
    CommandBar.AlwaysLeadingEdge
    CommandBar.AlwaysTrailingEdge
    CommandBar.BackColor
    CommandBar.Font
    CommandBar.Cursor
    CommandBar.AllowDrop
    CommandBar.Enabled
    CommandBar.Location
    CommandBar.IsDragging
    CommandBar.IsChevronVisible
    CommandBar.VLeft
    CommandBar.VRight
    CommandBar.VLocation
    CommandBar.VBounds
    CommandBar.IsCustomizing
    CommandBar.PopupContainer
    CommandBar.PopupMenu
    CommandBar.AllowQuickCustomizing
    CommandBar.DesignProcess
    CommandBar.ICommandBarDesignerInvoke.CommandBarBaseVisibility
    CommandBar.IPopupParent.IsRightToLeft
    CommandBar.CommandBarWrapping
    CommandBar.CommandBarDropDownClicked
    CommandBar.CommandBarStateChanging
    CommandBar.CommandBarStateChanged
    CommandBar.CommandBarUserClosed
    Namespace: Syncfusion.Windows.Forms.Tools
    Assembly: Syncfusion.Tools.Windows.dll
    Syntax
    public class ControlBar : CommandBar, IPopupParent, IPopupItem, ICommandBarDesignerInvoke, ICommandBarDesignerMouseHook

    Constructors

    ControlBar()

    Creates a new instance of the ControlBar class.

    Declaration
    public ControlBar()

    Fields

    bDockedSizing

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

    cptnControl

    Declaration
    protected Control cptnControl
    Field Value
    Type Description
    System.Windows.Forms.Control

    maxSize

    Declaration
    protected Size maxSize
    Field Value
    Type Description
    System.Drawing.Size

    minSize

    Declaration
    protected Size minSize
    Field Value
    Type Description
    System.Drawing.Size

    nCtrlBarCaptionHt

    Declaration
    protected int nCtrlBarCaptionHt
    Field Value
    Type Description
    System.Int32

    ptSizingStart

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

    Properties

    CaptionControl

    Gets / sets the control that is displayed in the CommandBar's caption region.

    Declaration
    public Control CaptionControl { get; set; }
    Property Value
    Type Description
    System.Windows.Forms.Control

    A System.Windows.Forms.Control instance.

    CaptionRect

    Declaration
    protected override Rectangle CaptionRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle
    Overrides
    CommandBar.CaptionRect

    ClientControl

    Gets the client control in the control collection.

    Declaration
    protected Control ClientControl { get; }
    Property Value
    Type Description
    System.Windows.Forms.Control

    CloseButtonRect

    Declaration
    protected override Rectangle CloseButtonRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle
    Overrides
    CommandBar.CloseButtonRect

    ControlBarCaptionHeight

    Gets / sets the height of the ControlBar caption area.

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

    An integer value representing the caption height.

    DockModeWrapping

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

    DragStartRect

    Declaration
    protected override Rectangle DragStartRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle
    Overrides
    CommandBar.DragStartRect

    DropDownRect

    Declaration
    protected override Rectangle DropDownRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle
    Overrides
    CommandBar.DropDownRect

    FloatModeWrapping

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

    GripperRect

    Declaration
    protected override Rectangle GripperRect { get; }
    Property Value
    Type Description
    System.Drawing.Rectangle
    Overrides
    CommandBar.GripperRect

    HideChevron

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

    IntegralHeight

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

    MaximumSize

    Gets / sets the maximum extent to which the ControlBar can be sized.

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

    A System.Drawing.Size value.

    MaxLength

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

    MinHeight

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

    MinimumSize

    Gets / sets the minimum extent to which the ControlBar can be sized.

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

    A System.Drawing.Size value.

    MinLength

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

    OccupyFullRow

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

    RowOffset

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

    ShowDockModeText

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

    Size

    Gets / sets the size of the ControlBar in pixels.

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

    Methods

    CalculateFloatingSize()

    Declaration
    protected override Size CalculateFloatingSize()
    Returns
    Type Description
    System.Drawing.Size
    Overrides
    CommandBar.CalculateFloatingSize()

    ChangeCommandBarOrientation()

    Declaration
    protected override void ChangeCommandBarOrientation()
    Overrides
    CommandBar.ChangeCommandBarOrientation()

    Dispose(Boolean)

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

    Declaration
    protected override void Dispose(bool bdisposing)
    Parameters
    Type Name Description
    System.Boolean bdisposing
    Overrides
    CommandBar.Dispose(Boolean)

    GetFirstAlignPreference()

    Declaration
    protected override PopupRelativeAlignment GetFirstAlignPreference()
    Returns
    Type Description
    PopupRelativeAlignment
    Overrides
    CommandBar.GetFirstAlignPreference()

    GetTextRectangle()

    Gets rectangle for display text of the ControlBar.

    Declaration
    protected override Rectangle GetTextRectangle()
    Returns
    Type Description
    System.Drawing.Rectangle
    Overrides
    CommandBar.GetTextRectangle()

    HandleMouseDown(MouseButtons, Point)

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

    HandleMouseMove(MouseButtons, Point)

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

    HandleMouseUp(MouseButtons, Point)

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

    InitializeCommandBar()

    Declaration
    protected override void InitializeCommandBar()
    Overrides
    CommandBar.InitializeCommandBar()

    Office2003Colors_MenuColorsChanged(Object, EventArgs)

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

    OnControlRemoved(ControlEventArgs)

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

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

    OnPaint(PaintEventArgs)

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

    SetChildControlBounds()

    Declaration
    protected override void SetChildControlBounds()
    Overrides
    CommandBar.SetChildControlBounds()

    SetRenderer()

    Sets renderer for ControlBar.

    Declaration
    protected override void SetRenderer()
    Overrides
    CommandBar.SetRenderer()

    Implements

    IPopupParent
    IPopupItem
    ICommandBarDesignerInvoke
    ICommandBarDesignerMouseHook
    Back to top Generated by DocFX
    Copyright © 2001 - 2023 Syncfusion Inc. All Rights Reserved