Syncfusion.Tools.Windows
Members  Example 


XPToolBar Class

The XPToolBar class provides you a tool bar like look-and-feel that you can use outside the XPMenus framework to display BarItems.
Object Model
XPToolBar ClassBrushInfo ClassBar ClassBarItems ClassBarItem ClassBarItems ClassBarItem ClassIPopupParent InterfaceIBarRenderer InterfaceVisuallyInheritableIntList ClassIntListDesignTime ClassIntListDesignTime Class
Syntax
'Declaration
 
<DescriptionAttribute("Provides tool bar like look-and-feel to use outside XPMenus framework.")>
<DesignerAttribute(Syncfusion.Windows.Forms.Tools.Design.XPToolBarDesigner, System.ComponentModel.Design.IDesigner)>
<ToolboxBitmapAttribute(Syncfusion.Windows.Forms.Tools.CommandBar, "ToolboxIcons.XPToolBar.bmp")>
<ToolboxItemAttribute(True)>
<DefaultPropertyAttribute("Text")>
<DefaultEventAttribute("Click")>
<DesignerSerializerAttribute("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")>
<ToolboxItemFilterAttribute("System.Windows.Forms")>
<DesignerCategoryAttribute("Component")>
Public Class XPToolBar 
   Inherits BarControlInternal
   Implements Syncfusion.ComponentModel.IDesignable, Syncfusion.Windows.Forms.IIgnoreWorkingArea, Syncfusion.Windows.Forms.IThemedControl, Syncfusion.Windows.Forms.IVisualStyle, Syncfusion.Windows.Forms.Tools.Design.ICallWndProcListener, IBarControl, IBarHost 
'Usage
 
Dim instance As XPToolBar
[Description("Provides tool bar like look-and-feel to use outside XPMenus framework.")]
[Designer(Syncfusion.Windows.Forms.Tools.Design.XPToolBarDesigner, System.ComponentModel.Design.IDesigner)]
[ToolboxBitmap(Syncfusion.Windows.Forms.Tools.CommandBar, "ToolboxIcons.XPToolBar.bmp")]
[ToolboxItem(true)]
[DefaultProperty("Text")]
[DefaultEvent("Click")]
[DesignerSerializer("System.Windows.Forms.Design.ControlCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.CodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
[ToolboxItemFilter("System.Windows.Forms")]
[DesignerCategory("Component")]
public class XPToolBar : BarControlInternal, Syncfusion.ComponentModel.IDesignable, Syncfusion.Windows.Forms.IIgnoreWorkingArea, Syncfusion.Windows.Forms.IThemedControl, Syncfusion.Windows.Forms.IVisualStyle, Syncfusion.Windows.Forms.Tools.Design.ICallWndProcListener, IBarControl, IBarHost  
Remarks
The XP tool bar look-and-feel is becoming so popular that they are beginning to get used outside of the form's menu structure, inside the forms. A good example is the PropertyGrid control that uses this look and feel to provide users some command buttons at the top (the Categorized/Alphabetic button, etc.).

This XPToolBar makes it easy for you to get this tool bar look-and-feel outside the BarManager framework. Drop this control anywhere in your form and fill the items list with BarItems. You can also insert separators using the BeginGroupAt method.

Example
In code, you can initialize an XPToolBar as follows:
XPToolBar xpToolBar1;
// Create a new tool bar control.
            
XPToolBar xptoolbar2 = new XPToolBar();
// Add some one or more instances of BarItem to it.
xptoolbar2.Items.AddRange(new BarItem[]{this.barItem1, this.barItem2, this.barItem3});
// Setup a separator.
xptoolbar2.BeginGroupAt(this.barItem2);
            
// Set its position and add it to the Form.
xptoolbar2.Dock = DockStyle.Top;
xptoolbar2.Size = new Size(200, 30);
this.Controls.Add(xptoolbar2);
Dim xpToolBar1 As XPToolBar
' Create a new tool bar control.
Dim xptoolbar2 As New XPToolBar()
            
' Add some one or more instances of BarItem to it.
xptoolbar2.Items.AddRange(New BarItem() {Me.barItem1, Me.barItem2, Me.barItem3})
' Setup a separator.
xptoolbar2.BeginGroupAt(Me.barItem2)
            
' Set its position and add it to the Form.
xptoolbar2.Dock = DockStyle.Top
xptoolbar2.Size = New Size(200, 30)
Me.Controls.Add(xptoolbar2)
Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            Syncfusion.Windows.Forms.Tools.XPMenus.BarControlInternal
               Syncfusion.Windows.Forms.Tools.XPMenus.XPToolBar

AssemblyVersion

Syncfusion.Tools.Windows: 17.4460.0.39

See Also