Custom Visual Styles

Each of Studio for iPhone's fourteen controls can adapt to custom visual styles. To customize the Studio for iPhone controls, you will have to create a custom CSS style sheet and add it to your project as a visual style. The custom CSS style sheet should be named "styles.css".

 Tip: The easiest way to create a custom visual style is by modifying one of the control's pre-existing visual styles. You can find the .css sheets and images for Studio for iPhone's visual styles within the Studio for iPhone installation directory, C:\Program Files\ComponentOne Studio for iPhone\VisualStyles

Before you add your .css file and associated images, you will have to create a hierarchy of folders, the last of which will contain the style sheet and image folder. On the top-level of your project, create a folder named "VisualStyles". Underneath the VisualStyles folder, create a sub-folder bearing the style name (such as "CustomStyle"), and then, beneath that, create a sub-folder named after the control (for example, C1ViewPort). The image folder and .css file should be placed underneath the last folder in the hierarchy. The result will resemble the following:

 

 

 

This structure of these folders is very important; Studio for iPhone controls will always look for the ~/VisualStyles/StyleName/ControlName/styles.css path, as it is the default visual style path.

Once the .css file and images 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.

For task-based help on custom visual styles, see Adding Custom Visual Styles.


Send us comments about this topic.
Copyright © GrapeCity, inc. All rights reserved.