ComponentOne ToolBar for ASP.NET AJAX: ToolBar for ASP.NET AJAX Task-Based Help > Customizing the Appearance of a C1ToolBar > Changing C1ToolBar's Built-in Visual Style

Changing C1ToolBar’s Built-in Visual Style

This task illustrates how to change your visual style in Source view, Design view, and in code.

Note: This task assumes you have added toolbar items to the C1ToolBar control.

Changing the visual style using the designer:

To change the visual style of your C1ToolBar, follow these steps:

1.   Click C1ToolBar’s smart tag to open the C1ToolBar Tasks.

2.   Click the VisualStyles drop-down arrow and select a visual style from the list. For this example, choose Office2007Blue.

 

 

The Office2007Black visual style is applied to the C1ToolBar.

Changing the visual style in source view:

To change the visual style of your C1ToolBar in Source view, add VisualStyle="Office2007Black" to the <cc1:C1ToolBar> tag so that it resembles the following:

<cc1:C1ToolBar ID="C1ToolBar1" runat="server" VisualStyle="Office2007Black" VisualStylePath="~/C1WebControls/VisualStyles">

Changing the visual style programmatically:

To change the visual style, follow these steps:

1.   Import the following namespace into your project:

      Visual Basic

Imports C1.Web.UI.Controls.C1ToolBar

      C#

using C1.Web.UI.Controls.C1ToolBar;

2.   Add the following code to the Page_Load event:

      Visual Basic

Me.C1ToolBar1.VisualStyle = "Office2007Black"

      C#

this.C1ToolBar1.VisualStyle = "Office2007Black";

3.   Run the program.

 This Topic Illustrates the Following:

The following image shows a C1ToolBar with the Office2007Black visual style:

 


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.