ComponentOne MultiPage for ASP.NET AJAX: C1MultiPage Appearance > CSS Styling

CSS Styling

You can apply CSS styling to modify the styling of a C1MultiPage's elements. C1MultiPage offers two properties that allow you to alter different sections of the control. The properties are named and described in the table below. 

 

Property

Description

C1MultiPage.CssClass

Sets the CSS class for the entire control. 

C1PageView.CssClass

Sets the CSS class for an individual tab page.

 

You can add CSS styles to the control by adding a CSS style sheet to your project and setting an element's property to one of the CSS classes specified in your style sheet. To add font styling to one C1PageView, for example, you would add a class similar to the following to the style sheet:

 

.Font

{

       font-family:Comic Sans MS;

       font-size:x-large;

       color:Purple; 

}

 

Once the class is added to the style sheet, you can assign the Font class to the C1PageView.CssClass property of the specific page you want to add that styling to. If you want to apply that styling to the entire control, set the C1MultiPage.CssClass property to the Font class name.

CSS style sheets are particularly useful if you have numerous controls that you want to add the same styles to. For example, you can create one style sheet that specifies the characteristics of a control's border and then apply it to both a C1MultiPage control and a C1TabControl control.

To add a style sheet to your project, select Website | Add New Item from the Visual Studio's toolbar to open the Add New Item dialog box. Select Style Sheet from the box and click Add to add it to your Web project. 

Note:  You will have to link your style sheet to your project by adding the following line of code between the <head></head> tags in your .aspx page: <link href="StyleSheet.css" type="text/css" rel="stylesheet"> 

For task-based help on CSS styling, see Applying CSS Styles to C1MultiPage.


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