ComponentOne Splitter for ASP.NET AJAX: Splitter Panel's Appearance and Behavior > Panel CSS Styling

Panel CSS Styling

You can apply CSS styling to modify the styling of a C1Splitter's elements. C1Splitter offers two properties that allow you to alter the splitter panel with CSS styles. The properties are named and described in the table below.

 

Property

Description

C1Splitter.CssClass

Sets the CSS class that is applied to the entire control.

CssClass

Gets or sets the CSS class for the splitter panel.

 

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 change the font of one of the panels, 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 class ("Font") to the CssClass property to apply the new font to the splitter panel. If you want to apply the styles to the entire control, set the C1Splitter.CssClass property to the class name instead.

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 C1Splitter 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 information about applying CSS styles to the splitter panels, see Splitter Bar CSS Styling.

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


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