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

Changing the Visual Style

You can format the Input for ASP.NET AJAX controls with one of five built-in visual styles. Note that you can also use your own style; see Custom Visual Styles for more information. We will use C1MaskedInput in the following examples.

Changing the Visual Style Using the Smart Tag

You can change the style of the Input for ASP.NET AJAX controls at design time using the control's Tasks menu.

1.   Click the C1MaskedInput smart tag to open the C1MaskedInput Tasks menu.

2.   Click drop-down arrow next to VisualStyle.

3.   Select one of the built-in styles listed. The style is applied to the C1MaskedInput control.

Changing the Visual Style in Source View

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

<cc1:C1MaskedInput ID="C1MaskedInput1" runat="server" VisualStyle="Office2007Blue" Height="22px" Width="155px" />

Changing the Visual Style in Code

To change the style of an Input for ASP.NET AJAX control programmatically, use the following code. In this example, "Vista" is used, but you can replace it with any of the built-in styles (ArcticFox, Office2007Black, Office2007Blue, Office2007Silver, or Vista) or use your own style.

      Visual Basic

C1MaskedInput1.VisualStyle = "Vista"

      C#

C1MaskedInput1.VisualStyle = "Vista";


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