Class StatusBarAdv
The Essential Tools StatusBarAdv is an extension to the Windows Forms StatusBar. It supports different border and background styles and can contain other controls besides StatusBarAdvPanel.
Implements
Inherited Members
Namespace: Syncfusion.Windows.Forms.Tools
Assembly: Syncfusion.Tools.Windows.dll
Syntax
public class StatusBarAdv : GradientPanel, IThemedControl, INonClientPaintingSupport, ISupportInitialize, IThemeProvider, IVisualStyle, ICanCancel, IStatusBarAdv
Examples
The StatusBarAdv control can be used programmatically as detailed below:
// Create an instance of the StatusBarAdv class,
StatusBarAdv statusBarAdv1;
// Create the StatusBarAdv control
this.statusBarAdv1 = new StatusBarAdv();
this.statusBarAdv1.Alignment = Syncfusion.Windows.Forms.Tools.FlowAlignment.Far;
this.statusBarAdv1.Border3DStyle = System.Windows.Forms.Border3DStyle.RaisedInner;
this.statusBarAdv1.BorderColor = System.Drawing.Color.Black;
this.statusBarAdv1.BorderSides = System.Windows.Forms.Border3DSide.All;
this.statusBarAdv1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.statusBarAdv1.CustomLayoutBounds = new System.Drawing.Rectangle(0, 0, 0, 0);
this.statusBarAdv1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.statusBarAdv1.GradientColors = new System.Drawing.Color[0];
this.statusBarAdv1.Location = new System.Drawing.Point(0, 318);
this.statusBarAdv1.Name = "statusBarAdv1";
this.statusBarAdv1.Size = new System.Drawing.Size(856, 24);
this.statusBarAdv1.Spacing = new System.Drawing.Size(5, 2);
this.statusBarAdv1.TabIndex = 12;
// Set the properties of the StatusBarAdv control.
this.statusBarAdv1.Alignment = Syncfusion.Windows.Forms.Tools.FlowAlignment.Far;
this.statusBarAdv1.Border3DStyle = System.Windows.Forms.Border3DStyle.RaisedInner;
this.statusBarAdv1.BorderColor = System.Drawing.Color.Black;
this.statusBarAdv1.BorderSides = System.Windows.Forms.Border3DSide.All;
this.statusBarAdv1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.statusBarAdv1.CustomLayoutBounds = new System.Drawing.Rectangle(0, 0, 0, 0);
this.statusBarAdv1.Dock = System.Windows.Forms.DockStyle.Bottom;
this.statusBarAdv1.GradientColors = new System.Drawing.Color[0];
this.statusBarAdv1.Location = new System.Drawing.Point(0, 318);
this.statusBarAdv1.Name = "statusBarAdv1";
this.statusBarAdv1.Size = new System.Drawing.Size(856, 24);
this.statusBarAdv1.Spacing = new System.Drawing.Size(5, 2);
this.statusBarAdv1.TabIndex = 12;
// Add StatusBarAdvPanel controls to the StatusBarAdv control.
StatusBarAdvPanel statuBarAdvPanel1 = new StatusBarAdvPanel()
StatusBarAdvPanel statuBarAdvPanel2 = new StatusBarAdvPanel();
StatusBarAdvPanel statuBarAdvPanel3 = new StatusBarAdvPanel();
this.statusBarAdv1.Panels = new StatusBarAdvPanel[]
({
this.statusBarAdvPanel1,
this.statusBarAdvPanel2,
this.statusBarAdvPanel3});
this.statusBarAdvPanel1.BorderColor = System.Drawing.Color.Black;
this.statusBarAdvPanel1.BorderSides = System.Windows.Forms.Border3DSide.All;
this.statusBarAdvPanel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.statusBarAdvPanel1.GradientColors = new System.Drawing.Color[0];
this.statusBarAdvPanel1.Location = new System.Drawing.Point(541, 2);
this.statusBarAdvPanel1.Name = "statusBarAdvPanel1";
this.statusBarAdvPanel1.Size = new System.Drawing.Size(100, 20);
this.statusBarAdvPanel1.TabIndex = 1;
this.statusBarAdvPanel1.Text = "statusBarAdvPanel1";
this.statusBarAdvPanel1.Type = StatusBarAdvPanelType.CapsLockState;
this.statusBarAdvPanel2.BorderColor = System.Drawing.Color.Black;
this.statusBarAdvPanel2.BorderSides = System.Windows.Forms.Border3DSide.All;
this.statusBarAdvPanel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.statusBarAdvPanel2.GradientColors = new System.Drawing.Color[0];
this.statusBarAdvPanel2.Location = new System.Drawing.Point(646, 2);
this.statusBarAdvPanel2.Name = "statusBarAdvPanel2";
this.statusBarAdvPanel2.Size = new System.Drawing.Size(100, 20);
this.statusBarAdvPanel2.TabIndex = 2;
this.statusBarAdvPanel2.Text = "statusBarAdvPanel2";
this.statusBarAdvPanel2.Type = StatusBarAdvPanelType.NumLockState;
this.statusBarAdvPanel3.BorderColor = System.Drawing.Color.Black;
this.statusBarAdvPanel3.BorderSides = System.Windows.Forms.Border3DSide.All;
this.statusBarAdvPanel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D;
this.statusBarAdvPanel3.GradientColors = new System.Drawing.Color[0];
this.statusBarAdvPanel3.Location = new System.Drawing.Point(751, 2);
this.statusBarAdvPanel3.Name = "statusBarAdvPanel3";
this.statusBarAdvPanel3.Size = new System.Drawing.Size(100, 20);
this.statusBarAdvPanel3.TabIndex = 3;
this.statusBarAdvPanel3.Text = "statusBarAdvPanel3";
this.statusBarAdvPanel3.Type = StatusBarAdvPanelType.LongTime;
// Add the StatusBarAdv control to the form
this.Controls.Add(this.statusBarAdv1);
Dim statusBarAdv1 As StatusBarAdv
� Create the StatusBarAdv control
Me.statusBarAdv1 = New StatusBarAdv()
Me.statusBarAdv1.Alignment = Syncfusion.Windows.Forms.Tools.FlowAlignment.Far
Me.statusBarAdv1.Border3DStyle = System.Windows.Forms.Border3DStyle.RaisedInner
Me.statusBarAdv1.BorderColor = System.Drawing.Color.Black
Me.statusBarAdv1.BorderSides = System.Windows.Forms.Border3DSide.All
Me.statusBarAdv1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.statusBarAdv1.CustomLayoutBounds = New System.Drawing.Rectangle(0, 0, 0, 0)
Me.statusBarAdv1.Dock = System.Windows.Forms.DockStyle.Bottom
Me.statusBarAdv1.GradientColors = New System.Drawing.Color(){ }
Me.statusBarAdv1.Location = New System.Drawing.Point(0, 318)
Me.statusBarAdv1.Name = "statusBarAdv1"
Me.statusBarAdv1.Size = New System.Drawing.Size(856, 24)
Me.statusBarAdv1.Spacing = New System.Drawing.Size(5, 2)
Me.statusBarAdv1.TabIndex = 12
' Set the properties of the StatusBarAdv control.
Me.statusBarAdv1.Alignment = Syncfusion.Windows.Forms.Tools.FlowAlignment.Far
Me.statusBarAdv1.Border3DStyle = System.Windows.Forms.Border3DStyle.RaisedInner
Me.statusBarAdv1.BorderColor = System.Drawing.Color.Black
Me.statusBarAdv1.BorderSides = System.Windows.Forms.Border3DSide.All
Me.statusBarAdv1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.statusBarAdv1.CustomLayoutBounds = New System.Drawing.Rectangle(0, 0, 0, 0)
Me.statusBarAdv1.Dock = System.Windows.Forms.DockStyle.Bottom
Me.statusBarAdv1.GradientColors = New System.Drawing.Color(){ }
Me.statusBarAdv1.Location = New System.Drawing.Point(0, 318)
Me.statusBarAdv1.Name = "statusBarAdv1"
Me.statusBarAdv1.Size = New System.Drawing.Size(856, 24)
Me.statusBarAdv1.Spacing = New System.Drawing.Size(5, 2)
Me.statusBarAdv1.TabIndex = 12
' Add StatusBarAdvPanel controls to the StatusBarAdv control.
Call New StatusBarAdvPanel() StatusBarAdvPanel statuBarAdvPanel2 = New StatusBarAdvPanel()
Dim statuBarAdvPanel1 As New StatusBarAdvPanel() StatusBarAdvPanel statuBarAdvPanel2
Dim statuBarAdvPanel3 As New StatusBarAdvPanel()
Me.statusBarAdv1.Panels = New StatusBarAdvPanel() ({ Me.statusBarAdvPanel1, Me.statusBarAdvPanel2, Me.statusBarAdvPanel3
})
Me.statusBarAdvPanel1.BorderColor = System.Drawing.Color.Black
Me.statusBarAdvPanel1.BorderSides = System.Windows.Forms.Border3DSide.All
Me.statusBarAdvPanel1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.statusBarAdvPanel1.GradientColors = New System.Drawing.Color(){ }
Me.statusBarAdvPanel1.Location = New System.Drawing.Point(541, 2)
Me.statusBarAdvPanel1.Name = "statusBarAdvPanel1"
Me.statusBarAdvPanel1.Size = New System.Drawing.Size(100, 20)
Me.statusBarAdvPanel1.TabIndex = 1
Me.statusBarAdvPanel1.Text = "statusBarAdvPanel1"
Me.statusBarAdvPanel1.Type = StatusBarAdvPanelType.CapsLockState
Me.statusBarAdvPanel2.BorderColor = System.Drawing.Color.Black
Me.statusBarAdvPanel2.BorderSides = System.Windows.Forms.Border3DSide.All
Me.statusBarAdvPanel2.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.statusBarAdvPanel2.GradientColors = New System.Drawing.Color(){ }
Me.statusBarAdvPanel2.Location = New System.Drawing.Point(646, 2)
Me.statusBarAdvPanel2.Name = "statusBarAdvPanel2"
Me.statusBarAdvPanel2.Size = New System.Drawing.Size(100, 20)
Me.statusBarAdvPanel2.TabIndex = 2
Me.statusBarAdvPanel2.Text = "statusBarAdvPanel2"
Me.statusBarAdvPanel2.Type = StatusBarAdvPanelType.NumLockState
Me.statusBarAdvPanel3.BorderColor = System.Drawing.Color.Black
Me.statusBarAdvPanel3.BorderSides = System.Windows.Forms.Border3DSide.All
Me.statusBarAdvPanel3.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
Me.statusBarAdvPanel3.GradientColors = New System.Drawing.Color(){ }
Me.statusBarAdvPanel3.Location = New System.Drawing.Point(751, 2)
Me.statusBarAdvPanel3.Name = "statusBarAdvPanel3"
Me.statusBarAdvPanel3.Size = New System.Drawing.Size(100, 20)
Me.statusBarAdvPanel3.TabIndex = 3
Me.statusBarAdvPanel3.Text = "statusBarAdvPanel3"
Me.statusBarAdvPanel3.Type = StatusBarAdvPanelType.LongTime
' Add the StatusBarAdv control to the form
Me.Controls.Add(Me.statusBarAdv1)
Constructors
StatusBarAdv()
Initializes a new instance of the StatusBarAdv class.
Declaration
public StatusBarAdv()
Properties
Alignment
Gets or sets the alignment of the panels.
Declaration
public FlowAlignment Alignment { get; set; }
Property Value
Type |
---|
FlowAlignment |
Remarks
This property determines the location of the panels. If set to ChildConstraints the Panels` HAlign property will be used to position and size them.
AutoHeightControls
Gets or sets a value indicating whether the StatusBar will resize the height of the panels according to it`s height.
Declaration
public bool AutoHeightControls { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
The default value is true, indicating that when the StatusBar`s height changes the panels inside will also change their height.
BeforeTouchSize
Gets/Sets Control size before touch enabled
Declaration
public Size BeforeTouchSize { get; set; }
Property Value
Type |
---|
System.Drawing.Size |
CanApplyTheme
Gets or sets a value indicating whether a SkinManager theme style has been applied to the control.
Declaration
public bool CanApplyTheme { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | The default value is true. |
CanOverrideStyle
Gets or sets a value indicating whether control elements styles can be overridden by theme style settings.
Declaration
public bool CanOverrideStyle { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | Default value is false. |
Remarks
By default, the control's element styles will not be overridden by theme style settings if the style is set in sample level. If this property is enabled, element style will be overridden by theme style settings event if it is set in sample level. This property should be enabled or disabled before calling the ThemeName property of the control.
CustomLayoutBounds
Gets or sets a custom rectangle that the layout will use to display the panels.
Declaration
public Rectangle CustomLayoutBounds { get; set; }
Property Value
Type |
---|
System.Drawing.Rectangle |
Remarks
Set this property to specify new boundaries for the layout of the panels.
DefaultSize
Declaration
protected override Size DefaultSize { get; }
Property Value
Type |
---|
System.Drawing.Size |
EnableTouchMode
Gets or sets value to enable or disable the Touchmode to the controls.
Declaration
public bool EnableTouchMode { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
Scale factor will be updated automatically if scalefactor is equal to 1
MetroColor
Gets or sets the MetroColor color of the Statusbar.
Declaration
public Color MetroColor { get; set; }
Property Value
Type |
---|
System.Drawing.Color |
Panels
Gets or sets the StatusBarAdvPanel controls contained in the StatusBarAdv.
Declaration
public StatusBarAdvPanel[] Panels { get; set; }
Property Value
Type |
---|
StatusBarAdvPanel[] |
Remarks
Use this property to Add/Remove panels from the status bar.
ParentMaximized
Gets a value indicating whether the parent control is maximized.
Declaration
protected bool ParentMaximized { get; }
Property Value
Type |
---|
System.Boolean |
SizingGrip
Gets or sets a value indicating whether the Sizing grip is visible.
Declaration
public bool SizingGrip { get; set; }
Property Value
Type |
---|
System.Boolean |
Remarks
If SizingGrip is false the statusbar will not resize it`s parent.
Spacing
Gets or sets the spacing between the panels.
Declaration
public Size Spacing { get; set; }
Property Value
Type |
---|
System.Drawing.Size |
Style
Indicates the appearance for StatusBar
Declaration
public StatusbarStyle Style { get; set; }
Property Value
Type |
---|
StatusbarStyle |
ThemeName
Gets or sets the theme name of the StatusBarAdv control.
Declaration
public string ThemeName { get; set; }
Property Value
Type |
---|
System.String |
ThemesEnabled
Gets or sets a value indicating whether the Statusbar will draw a themed background. Indicated settings: BorderStyle = None.
Declaration
public bool ThemesEnabled { get; set; }
Property Value
Type |
---|
System.Boolean |
ThemeStyle
Gets or sets the StatusBarAdvVisualStyle value used to customize the appearance of the StatusBarAdv.
Declaration
public StatusBarAdvVisualStyle ThemeStyle { get; set; }
Property Value
Type |
---|
StatusBarAdvVisualStyle |
Remarks
This ThemeStyle settings will be applied only when the VisualStyleBased theme has been applied to the control.
UseMetroColorAsBorder
Gets or sets whether to set MetroColor as its Border color.
Declaration
public bool UseMetroColorAsBorder { get; set; }
Property Value
Type |
---|
System.Boolean |
Methods
ApplyScaleToControl(Single)
Scale the control based on the scale factor passed in the argument.
Declaration
public void ApplyScaleToControl(float scaleFactor)
Parameters
Type | Name | Description |
---|---|---|
System.Single | scaleFactor | value to scale the factor based upon. |
BeginInit()
Begins initialization of the control.
Declaration
public override void BeginInit()
Overrides
Dispose(Boolean)
Cleans up any resources being used.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | True if disposing. |
Overrides
EndInit()
Ends initialization of the control.
Declaration
public override void EndInit()
Overrides
GetActiveThemeName()
Gets the active theme name of the StatusBarAdv control.
Declaration
public string GetActiveThemeName()
Returns
Type | Description |
---|---|
System.String | Returns the active theme name. |
GetControlName()
Used to get the Control name.
Declaration
protected virtual string GetControlName()
Returns
Type |
---|
System.String |
GetIsMirrored()
Indicates whether the control should be drawn right-to-left.
Declaration
protected bool GetIsMirrored()
Returns
Type | Description |
---|---|
System.Boolean | True if the control is to be drawn right-to-left; false otherwise. |
GetPreferredSize(Control)
Returns the preferred size of the specified control.
Declaration
public Size GetPreferredSize(Control control)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | control | The control whose preferred size is to be returned. |
Returns
Type | Description |
---|---|
System.Drawing.Size | The preferred size of the control. |
LockRedraw()
Declaration
protected void LockRedraw()
OnBorderColorChanged()
Invokes when the border color changes.
Declaration
protected override void OnBorderColorChanged()
Overrides
OnFontChanged(EventArgs)
Font changed
Declaration
protected override void OnFontChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
OnPaint(PaintEventArgs)
Declaration
protected override void OnPaint(PaintEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.PaintEventArgs | e |
Overrides
OnRightToLeftChanged(EventArgs)
Declaration
protected override void OnRightToLeftChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
OnSizeChanged(EventArgs)
Declaration
protected override void OnSizeChanged(EventArgs e)
Parameters
Type | Name | Description |
---|---|---|
System.EventArgs | e |
Overrides
ResetMetroColor()
To Reset MetroColor
Declaration
public void ResetMetroColor()
SetHAlign(Control, HorzFlowAlign)
Sets the horizontal alignment options for the specified control.
Declaration
public void SetHAlign(Control control, HorzFlowAlign align)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | control | The control whose HAlign is to be set. |
HorzFlowAlign | align | The alignment option to be set to the specified control. |
Remarks
If the StatusBar`s Alignment property is set to ChildContstraints, the StatusBar will use this option in the positioning and resizing of the control.
SetPreferredSize(Control, Size)
Sets the preferred size in the layout of the specified control.
Declaration
public void SetPreferredSize(Control control, Size size)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Control | control | The control whose preferred size is to be set. |
System.Drawing.Size | size | The size. |
Remarks
Use this method to set the preferred size of a control inside the StatusBar.
ShouldEnableSizing()
Indicates whether sizing should be enabled.
Declaration
protected virtual bool ShouldEnableSizing()
Returns
Type | Description |
---|---|
System.Boolean | True to enable sizing by the user; false otherwise. |
Remarks
This method indicates whether the StatusBarAdv's SizingGrip is on, is docked to the bottom, the right-bottom corner aligns with the parent's right-bottom and that the Parent is not maximized.
ShouldSerializeMetroColor()
To indicate whether to serialize MetroColor or not
Declaration
public bool ShouldSerializeMetroColor()
Returns
Type |
---|
System.Boolean |
ThemedPaintBackground(Graphics, Rectangle, Rectangle)
Declaration
protected override void ThemedPaintBackground(Graphics graphics, Rectangle rect, Rectangle clip)
Parameters
Type | Name | Description |
---|---|---|
System.Drawing.Graphics | graphics | |
System.Drawing.Rectangle | rect | |
System.Drawing.Rectangle | clip |
Overrides
UnlockRedraw()
Declaration
protected void UnlockRedraw()
WndProc(ref Message)
Declaration
protected override void WndProc(ref Message m)
Parameters
Type | Name | Description |
---|---|---|
System.Windows.Forms.Message | m |
Overrides
Events
ThemeNameChanged
Occurs when theme name of the StatusBarAdv has changed.
Declaration
public event ThemeChangedEventHandler ThemeNameChanged
Event Type
Type |
---|
ThemeChangedEventHandler |
Explicit Interface Implementations
ICanCancel.CancelOperation()
Declaration
void ICanCancel.CancelOperation()
IVisualStyle.VisualTheme
Declaration
string IVisualStyle.VisualTheme { get; set; }
Returns
Type |
---|
System.String |
IThemeProvider.BaseThemeName
Gets or sets the BaseTheme name of the theme
Declaration
string IThemeProvider.BaseThemeName { get; set; }
Returns
Type |
---|
System.String |
IThemeProvider.ControlName
Gets the name of the control.
Declaration
string IThemeProvider.ControlName { get; }
Returns
Type |
---|
System.String |