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
ControlBar
Assembly: Syncfusion.Tools.Windows.dll
public class ControlBar : CommandBar, IPopupParent, IPopupItem, ICommandBarDesignerInvoke, ICommandBarDesignerMouseHook
Constructors
Creates a new instance of the ControlBar class.
Declaration
Fields
Declaration
protected static bool bDockedSizing
Field Value
Declaration
protected Control cptnControl
Field Value
Type |
System.Windows.Forms.Control |
Declaration
Field Value
Declaration
Field Value
Declaration
protected int nCtrlBarCaptionHt
Field Value
Declaration
protected static Point ptSizingStart
Field Value
Type |
System.Drawing.Point |
Properties
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.
|
Declaration
protected override Rectangle CaptionRect { get; }
Property Value
Type |
System.Drawing.Rectangle |
Overrides
Gets the client control in the control collection.
Declaration
protected Control ClientControl { get; }
Property Value
Type |
System.Windows.Forms.Control |
Declaration
protected override Rectangle CloseButtonRect { get; }
Property Value
Type |
System.Drawing.Rectangle |
Overrides
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.
|
Declaration
public override bool DockModeWrapping { get; set; }
Property Value
Overrides
Declaration
protected override Rectangle DragStartRect { get; }
Property Value
Type |
System.Drawing.Rectangle |
Overrides
Declaration
protected override Rectangle DropDownRect { get; }
Property Value
Type |
System.Drawing.Rectangle |
Overrides
Declaration
public override bool FloatModeWrapping { get; set; }
Property Value
Overrides
Declaration
protected override Rectangle GripperRect { get; }
Property Value
Type |
System.Drawing.Rectangle |
Overrides
Declaration
public override bool HideChevron { get; set; }
Property Value
Overrides
Declaration
public override int IntegralHeight { get; set; }
Property Value
Overrides
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.
|
Declaration
public override int MaxLength { get; set; }
Property Value
Overrides
Declaration
public override int MinHeight { get; set; }
Property Value
Overrides
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.
|
Declaration
public override int MinLength { get; set; }
Property Value
Overrides
Declaration
public override bool OccupyFullRow { get; set; }
Property Value
Overrides
Declaration
public override int RowOffset { get; set; }
Property Value
Overrides
ShowDockModeText
Declaration
public override bool ShowDockModeText { get; set; }
Property Value
Overrides
Gets / sets the size of the ControlBar in pixels.
Declaration
public Size Size { get; set; }
Property Value
Methods
Declaration
protected override Size CalculateFloatingSize()
Returns
Overrides
Declaration
protected override void ChangeCommandBarOrientation()
Overrides
Overridden. See System.Windows.Forms.Control.Dispose(System.Boolean).
Declaration
protected override void Dispose(bool bdisposing)
Parameters
Type |
Name |
Description |
System.Boolean |
bdisposing |
|
Overrides
Declaration
protected override PopupRelativeAlignment GetFirstAlignPreference()
Returns
Overrides
GetTextRectangle()
Gets rectangle for display text of the ControlBar.
Declaration
protected override Rectangle GetTextRectangle()
Returns
Type |
System.Drawing.Rectangle |
Overrides
Declaration
public override void HandleMouseDown(MouseButtons button, Point ptscreen)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseButtons |
button |
|
System.Drawing.Point |
ptscreen |
|
Overrides
Declaration
public override void HandleMouseMove(MouseButtons button, Point ptscreen)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseButtons |
button |
|
System.Drawing.Point |
ptscreen |
|
Overrides
Declaration
public override void HandleMouseUp(MouseButtons button, Point ptscreen)
Parameters
Type |
Name |
Description |
System.Windows.Forms.MouseButtons |
button |
|
System.Drawing.Point |
ptscreen |
|
Overrides
Declaration
protected override void InitializeCommandBar()
Overrides
Declaration
public void Office2003Colors_MenuColorsChanged(object sender, EventArgs e)
Parameters
Type |
Name |
Description |
System.Object |
sender |
|
System.EventArgs |
e |
|
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
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
Type |
Name |
Description |
System.Windows.Forms.PaintEventArgs |
e |
|
Overrides
Declaration
protected override void SetChildControlBounds()
Overrides
Sets renderer for ControlBar.
Declaration
protected override void SetRenderer()
Overrides
Implements