Xceed Chart for WinForms v4.4 Documentation
ToolBar Class
Members  Example 


Xceed.Chart.UIControls.v4.4 Assembly > Xceed.Chart.UIControls Namespace : ToolBar Class
Represents a toolbar-like control with flat appearance and support for custom drop-down controls. It provides all the functionality of the standard Windows.Forms.ToolBar as well as moving and changing location. This toolbar also provides some extended features as dropping custom PopupWindow objects instead of the standard ContextMenus.
Object Model
ToolBar Class
Syntax
'Declaration
 
<ToolboxItemAttribute(ToolboxItemType=, ToolboxItemTypeName="")>
<DesignerAttribute(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="Xceed.Chart.UIControls.ToolBarDesigner, Xceed.Chart.UIControls.v4.4, Version=4.4.100.0, Culture=neutral, PublicKeyToken=ba83ff368b7563c6")>
Public Class ToolBar 
   Inherits System.Windows.Forms.Control
'Usage
 
Dim instance As ToolBar
[ToolboxItem(ToolboxItemType=, ToolboxItemTypeName="")]
[Designer(DesignerBaseTypeName="System.ComponentModel.Design.IDesigner", DesignerTypeName="Xceed.Chart.UIControls.ToolBarDesigner, Xceed.Chart.UIControls.v4.4, Version=4.4.100.0, Culture=neutral, PublicKeyToken=ba83ff368b7563c6")]
public class ToolBar : System.Windows.Forms.Control 
Remarks
You may also add standard controls - they have to be assigned to a ToolBarButton object with its 'Style' property set to ToolBarButtonStyle.Control - to the toolbar and they will be repositioned and treated as if they are toolbar buttons.
Example
The following example demostrates how to add a combobox to an existing ToolBar object: This is useful because if you add the control directly to the toolbar you will be responsible for its proper location and size, while assigning it to a toolbar button guaranties you that.
'create a toolbar
Dim toolbar As ToolBar =  New ToolBar() 

'create a toolbar button
Dim tbb As ToolBarButton =  New ToolBarButton() 
tbb.Style = ToolBarButtonStyle.Control

'create a standard combobox
Dim combo As ComboBox =  New ComboBox() 

'assign it to the toolbar button
tbb.Control = combo

toolbar.Buttons.Add(tbb)
//create a toolbar
ToolBar toolbar = new ToolBar();

//create a toolbar button
ToolBarButton tbb = new ToolBarButton();
tbb.Style = ToolBarButtonStyle.Control;

//create a standard combobox
ComboBox combo = new ComboBox();

//assign it to the toolbar button
tbb.Control = combo;

toolbar.Buttons.Add(tbb);
Inheritance Hierarchy

System.Object
   System.MarshalByRefObject
      System.ComponentModel.Component
         System.Windows.Forms.Control
            Xceed.Chart.UIControls.ToolBar
               Xceed.Chart.ChartToolbarControl

Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

ToolBar Members
Xceed.Chart.UIControls Namespace