Skip to main content

Bar Members

Represents a Windows-like toolbar.

Constructors

Name Description
Bar() Initializes a new Bar class instance with default settings.
Bar(BarManager, String, BarDockStyle, BarOptionFlags, Rectangle, LinksInfo, Point, Int32, BarCanDockStyle, Color, Image, Int32, Int32) Obsolete. Initializes a new Bar class instance.
Bar(BarManager, String, BarDockStyle, BarOptionFlags, Rectangle, LinksInfo, Point, Int32, BarCanDockStyle, Color, Image) Obsolete. Initializes a new Bar class instance.
Bar(BarManager, String, BarDockStyle, BarOptionFlags, Rectangle, LinksInfo, Point, Int32, BarCanDockStyle, Color, Int32, Int32) Obsolete. Initializes a new Bar object with the specified settings.
Bar(BarManager, String, BarDockStyle, BarOptionFlags, Rectangle, LinksInfo, Point, Int32, BarCanDockStyle, Color) Obsolete. Initializes a new Bar class instance.
Bar(BarManager, String, BarDockStyle, BarOptionFlags, Rectangle, LinksInfo, Point, Int32, BarCanDockStyle) Obsolete. Initializes a new Bar object with the specified settings.
Bar(BarManager, String, BarDockStyle, BarOptionFlags, Rectangle, LinksInfo, Point, Int32) Obsolete. This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Bar(BarManager, String, BarDockStyle, BarOptionFlags, Rectangle, LinksInfo) Obsolete. Initializes a new Bar class instance.
Bar(BarManager, String, BarDockStyle, Rectangle, LinksInfo, Point, Int32, BarCanDockStyle, Color, Image, Int32, Int32) Initializes a new instance of the Bar class with the specified settings.
Bar(BarManager, String, BarDockStyle, Rectangle, LinksInfo, Point, Int32, BarCanDockStyle, Color, Image) Initializes a new instance of the Bar class with the specified settings.
Bar(BarManager, String, BarDockStyle, Rectangle, LinksInfo, Point, Int32, BarCanDockStyle, Color, Int32, Int32) Initializes a new instance of the Bar class with the specified settings.
Bar(BarManager, String, BarDockStyle, Rectangle, LinksInfo, Point, Int32, BarCanDockStyle, Color) Initializes a new instance of the Bar class with the specified settings.
Bar(BarManager, String, BarDockStyle, Rectangle, LinksInfo, Point, Int32, BarCanDockStyle) Initializes a new instance of the Bar class with the specified settings.
Bar(BarManager, String, BarDockStyle, Rectangle, LinksInfo, Point, Int32) Initializes a new instance of the Bar class with the specified settings.
Bar(BarManager, String, BarDockStyle, Rectangle, LinksInfo) Initializes a new instance of the Bar class with the specified settings.
Bar(BarManager, String) Initializes a new instance of the Bar class.
Bar(BarManager) Initializes a new instance of the Bar class.

Properties

Name Description
AccessibleDescription Gets or sets the object’s description used by accessibility client applications.
AccessibleName Gets or sets the object’s name used by accessibility client applications.
AccessibleRole Gets or sets the object’s accessible role.
Appearance Specifies appearance settings for items in this bar in the normal state. This property is equivalent to the Normal property that you can access through the BarAppearance property.
AutoUpdateMergedBars Gets or sets whether items added to/removed from a child bar merged with this bar are automatically added to/removed from this bar.
BackColor Obsolete. Gets or sets the background color of the Bar.
BackgroundImage Obsolete. Gets or sets the background image of the Bar.
BarAppearance Specifies appearance settings for items in this bar in different states.
BarItemHorzIndent Gets or sets the horizontal indent, in pixels, between a bar item link’s content and borders.
BarItemVertIndent Gets or sets the vertical indent, in pixels, between a bar item link’s content and borders.
BarName Gets or sets the name of the bar.
CanDockStyle Gets or sets a value specifying the manner in which a bar can be docked.
CanMove Gets a value indicating whether the Bar can be moved.
CanRaiseEvents protected Gets a value indicating whether the component can raise an event. Inherited from Component.
CloseSubMenusOnMouseLeave
Container Gets the IContainer that contains the Component. Inherited from Component.
DesignMode protected Gets a value that indicates whether the Component is currently in design mode. Inherited from Component.
DockCol Gets or sets the bar column index position when it is docked.
DockRow Gets or sets the bar row index when it is docked.
DockStyle Gets or sets the Bar dock style.
Events protected Gets the list of event handlers that are attached to this Component. Inherited from Component.
FloatLocation Get or sets the Bar location in screen coordinates if the bar is floating.
FloatSize Get or sets the size of the Bar in pixels if the bar is floating.
HideWhenMerging

Gets or sets whether the current child bar is hidden from the child form during a merge operation. This option is in effect if you subscribed to the parent BarManager’s BarManager.Merge and BarManager.UnMerge events.

IsFloating Gets a value indicating whether the Bar is floating.
IsLoading Indicates that the Bar Manager is being loaded.
IsMainMenu Gets a value indicating whether the Bar is the application’s main menu.
IsMerged Gets whether another bar has been merged into the current bar.
IsStatusBar Gets a value indicating whether the bar is a status bar.
ItemLinks Gets the collection of item links belonging to the current bar.
LinksPersistInfo This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
Manager Gets or sets a value representing the Bar Manager that owns this bar.
MergeSource Gets the collection of item links that have been merged into the current bar.
Offset Gets or sets the offset in pixels from the left or top border of the bar container based on the dock style.
Options Obsolete. Gets or sets the options used to create a Bar.
OptionsBar Provides access to customization options for the current bar.
Site Gets or sets the ISite of the Component. Inherited from Component.
Size Gets the bar’s size.
StandaloneBarDockControl Gets or sets the StandaloneBarDockControl control to which the bar belongs, if any.
StandaloneBarDockControlName Gets or sets the name of the StandaloneBarDockControl control to which the bar belongs, if any.
Tag Gets or sets an object that contains custom data for the current Bar object.
Text Gets or sets the bar’s display text.
Visible Gets or sets a value indicating whether the Bar is displayed.
VisibleLinks Gets the collection of visible bar item links displayed within the bar.

Methods

Name Description
AddItem(BarItem) Adds a link to the Bar control.
AddItems(BarItem[]) Creates links to bar items passed as an array.
ApplyDockRowCol() Applies changes made by the Bar.DockCol and Bar.DockRow properties.
AskReset() Returns a Bar to its designed state.
BeginUpdate() Locks the Bar, preventing visual updates of the object and its elements until the EndUpdate or CancelUpdate method is called.
CancelUpdate() Unlocks the Bar object after it has been locked by the BeginUpdate method, without causing an immediate visual update.
ClearLinks() Removes all links from the Bar control.
CreateObjRef(Type) Creates an object that contains all the relevant information required to generate a proxy used to communicate with a remote object. Inherited from MarshalByRefObject.
Dispose() Releases all resources used by the Component. Inherited from Component.
EndUpdate() Unlocks the Bar object after a call to the BeginUpdate method and causes an immediate visual update.
Equals(Object, Object) static Determines whether the specified object instances are considered equal. Inherited from Object.
Equals(Object) Determines whether the specified object is equal to the current object. Inherited from Object.
ForceUpdateBar() Forces the current Bar to be refreshed.
ForceUpdateLayout() Forces this Bar to redraw itself.
GetActualLinks() Retrieves the list of links currently displayed within this Bar.
GetBarControl() This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
GetDistanceBetweenItems(Single) Returns the actual distance between neighboring bar items.
GetHashCode() Serves as the default hash function. Inherited from Object.
GetLifetimeService() Retrieves the current lifetime service object that controls the lifetime policy for this instance. Inherited from MarshalByRefObject.
GetLinkHorzIndent() Returns the actual horizontal indent, in pixels, between a bar item link’s content and borders.
GetLinkHorzIndent(Single) Returns the actual horizontal indent, in pixels, between a bar item link’s content and borders.
GetLinkVertIndent() Returns the actual vertical indent, in pixels, between a bar item link’s content and borders.
GetLinkVertIndent(Single) Returns the actual vertical indent, in pixels, between a bar item link’s content and borders.
GetService(Type) protected Returns an object that represents a service provided by the Component or by its Container. Inherited from Component.
GetType() Gets the Type of the current instance. Inherited from Object.
InitializeLifetimeService() Obtains a lifetime service object to control the lifetime policy for this instance. Inherited from MarshalByRefObject.
InsertItem(BarItemLink, BarItem) Inserts a link in the Bar at the specified index.
Invalidate() Updates a bar control.
MemberwiseClone() protected Creates a shallow copy of the current Object. Inherited from Object.
MemberwiseClone(Boolean) protected Creates a shallow copy of the current MarshalByRefObject object. Inherited from MarshalByRefObject.
Merge(Bar) Adds the visible links from the specified bar onto the current bar.
ReferenceEquals(Object, Object) static Determines whether the specified Object instances are the same instance. Inherited from Object.
RemoveLink(BarItemLink) Removes the first occurrence of a specific link from the Bar.
Reset() Returns a Bar to its designed state.
SetCurrentStateAsDefault() This member supports the .NET Framework infrastructure and is not intended to be used directly from your code.
ToString() Returns a String that represents the current Bar.
UnMerge() Restores the links layout of the current bar after another bar has been merged with it.

Events

Name Description
Disposed Occurs when the component is disposed by a call to the Dispose() method. Inherited from Component.
DockChanged Occurs after the bar has been docked to another position by an end-user.
LinkAdded Fires immediately after a link has been added to the bar.
LinkDeleted Fires immediately after a link has been removed from the bar.
VisibleChanged Fires immediately after the visibility of the bar has been changed.
See Also