ComponentOne ProgressBar for ASP.NET AJAX: ProgressBar for ASP.NET AJAX Task-Based Help > Changing the Visual Style

Changing the Visual Style

A C1ProgressBar control has five embedded visual styles that you can apply with just a few clicks. This topic illustrates how to change the visual style in Design view, in Source view, and in code. For more information on visual styles, see Visual Styles.

Changing the Visual Style in Design View

To change the visual scheme of your C1ProgressBar, follow these steps:

1.   Click the C1ProgressBar smart tag () to open the C1ProgressBar Tasks menu.

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

 

     

 

The Office2007Blue visual scheme is applied to the C1ProgressBar control.

Changing the Visual Style in Source View

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

 

<cc1:C1ProgressBar ID="C1ProgressBar1" runat="server" VisualStyle="Office2007Blue" VisualStylePath="~/C1WebControls/VisualStyles">

Changing the Visual Style in Code

To change the visual scheme, follow these steps:

1.   Import the following namespace into your project:

      Visual Basic

Imports C1.Web.UI.Controls

      C#

using C1.Web.UI.Controls;

2.   Add the following code, which sets the VisualStyle property, to the Page_Load event:

      Visual Basic

C1ProgressBar1.VisualStyle = "Office2007Blue"

      C#

C1ProgressBar1.VisualStyle = "Office2007Blue";

3.   Run the program.

This topic illustrates the following:

The following image shows a C1ProgressBar control with the Office2007Blue visual style:

 


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