Adding the C1WebCommand2 Components to a Project
When you install ComponentOne Studio for ASP.NET 2.0, the Create a ComponentOne Visual Studio 2005 Toolbox Tab check box is checked, by default, in the installation wizard. When you open Visual Studio 2005, you will notice a ComponentOne Studio for ASP.NET 2.0 Projects tab containing the ComponentOne controls has automatically been added to the Toolbox.
If you decide to uncheck the Create a ComponentOne Visual Studio 2005 Toolbox Tab check box during installation, you can manually add ComponentOne controls to the Toolbox at a later time.
• C1WebMenu
• C1WebToolBar
• C1WebTopicBar
• C1WebTreeView
• C1WebTabStrip
C1WebMenu represents a root menu in a Web Forms page. It is a tree type control that is a descendant from C1WebCustomTreeControl class. The C1WebMenu control is a menu that (unlike submenus) is always visible on your form. After you have placed it on the form, you can add menu items to it by right-clicking the menu and selecting Edit menu from the context menu. This exposes the C1WebCommandEditor. The C1WebCommandEditor can be used to add, delete, and move menu items and submenus in the hierarchy. You can select either horizontal or vertical layout for the root menu. Several root menus can be placed on the same form.
C1WebToolBar represents a toolbar. It is a flat type control since it only contains two levels items and groups. Like the C1WebMenu, it is also always visible on the form. After you have placed it on the form, you can add C1WebToolBarButtons (of the type C1WebToolBarItem, C1WebContentItem, and C1WebSeparator items) by right-clicking the C1WebToolBar and selecting Edit Groups from the context menu. This exposes the C1WebToolBarGroup Collection Editor. Also use the design time context menu to change the style of the C1WebToolBar by selecting Auto Format and choosing a pre-defined scheme from the Auto Format dialog box.
C1WebTopicBar represents a topicbar Web control. Like the root menu and toolbar, it is always visible on the form. It is a flat control that consists of two levels items and groups. The items and groups can be collapsed or expanded. After you have placed it on the form you can add groups and items to it by right-clicking the C1WebTopicBar and selecting Edit Groups from the context menu. This exposes the C1WebTopicBarGroup Collection Editor, which can be used to add, delete, and edit items and groups. The C1WebTopicBar control allows you to implement elegant windows XP-style or custom designed navigation panels on your Web pages.
C1WebTreeView represents a hierarchical tree structure like the C1WebMenu control. It is always visible on the form. It is a tree type control that is a descendant from C1WebCustomTreeControl class. After you have placed it on the form, you can add tree items to it by right-clicking the treeview and selecting Edit Groups from the context menu exposes the C1WebTreeView Collection Editor, which can be used to add, delete, and move items and child items in the hierarchy.
C1WebTabStrip represents an ASP.NET tabbed control. It is a flat type control which consists of two levels: items and groups. The tabbed type controls are often used for navigating a Web site. After you have placed it on the form, you can add tabs (groups) and items to it by right-clicking the TabStrip and selecting Edit Groups from the context menu. This exposes the C1WebTabStripGroup Collection Editor.
To use C1WebCommand, add these controls to the form or add a reference to the C1.Web.C1Command assembly to your project.
Manually Adding C1WebCommand to the Toolbox
When you install C1WebCommand, the following C1WebCommand components will appear in the Visual Studio Toolbox customization dialog box:
• C1WebMenu
• C1WebToolBar
• C1WebTopicBar
• C1WebTreeView
• C1WebTabStrip
To manually add the C1WebCommand controls to the Visual Studio Toolbox:
1. Open the Visual Studio IDE (Microsoft Development Environment). Make sure the Toolbox is visible (select Toolbox in the View menu if necessary) and right-click it to open the context menu.
2. To make the C1WebCommand components appear on their own tab in the Toolbox, select Add Tab from the context menu and type in the tab name, C1WebCommand2, for example.
3. Right-click the tab where the component is to appear and select Choose Items from the context menu.
The Choose Toolbox Items dialog box opens.
4. In the dialog box, select the .NET Framework Components tab. Sort the list by Namespace (click the Namespace column header) and check the check boxes for all components belonging to namespace C1.Web.Command. Note that there may be more than one component for each namespace.
Adding C1WebCommand2 Controls to the Form
To add C1WebCommand 2 controls to a form:
1. Add them to the Visual Studio toolbox.
2. Double-click each control or drag it onto your form.
Adding a Reference to the Assembly
To add a reference to the C1.Web. Command.2 assembly:
1. Select the Add Reference option from the Website menu of your Web Site project or from the Project menu of your Web Application project.
2. Select the most recent version of the ComponentOne C1WebCommand for ASP.NET assembly from the list on the NET tab or browse to find the C1.Web.Command.2.dll file and click OK.
3. Select the Form1.vb tab or go to View|Code to open the Code Editor. At the top of the file, add the following Imports directive (using in C#):
Imports C1.Web.Command
Note: This makes the objects defined in the C1.Web.Command.2 assembly visible to the project. See Namespaces for more information.
|