ComponentOne Calendar for ASP.NET: Calendar Appearance > Custom Visual Styles

Custom Visual Styles

While Calendar for ASP.NET comes with five built-in styles, we recognize that there are instances where that you will want to customize your C1Calendar control. To customize the C1Calendar control, you will create a custom CSS style sheet and add it to your project as a visual style. The custom CSS stylesheet must always be named "styles.css".

Before you add your .css file and images, you will have to create a folder to contain them. The folder that will contain them will be buried within a hierarchy of folders. On the top-level of your project, create a folder named "VisualStyles". Underneath the VisualStyles folder, create a sub-folder bearing the theme name (such as "CustomStyle"), and then, beneath that, create a sub-folder named "C1Calendar". The image folder and .css file should be placed underneath the C1Calendar folder. Once the .css file and image are in place, set the VisualStylePath property to the path of the first folder (~/VisualStyles), set the UseEmbeddedVisualStyles property to False, and then set the VisualStyle property to the custom theme name.

You can create a visual style from scratch, but the simplest way to create a custom style sheet is to modify one of the control's pre-existing CSS styles.


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