How To : Using StyleProjects

Back to Concepts and HOW TOs

Contents

[edit] Description

This document describes how to add a Style Project to a solution, and apply a StyleSheet to a form.

[edit] Prerequisites

Understanding StyleProjects
Adding a Project to a Solution

[edit] Procedure

First you add a StyleProject to your solution, then add StyleSheets to the StyleProject. Finally, you apply the StyleSheet to your form.

To add a StyleProject to a solution: 

  1. Right-click on your solution and select Add Project.
  2. Follow the wizard to add a StyleProject (see Adding a Project to a Solution).

To add a StyleSheet to a StyleProject:

  1. Right-click on your StyleProject and select Add StyleSheet. The Style Sheet Design dialog box is displayed showing available style elements:
  2. In Name, type a name of the StyleSheet. To add specific style elements, select the element's check box on the left. You can select as many as needed.
  3. Select the name of the style element to make immediate changes to that style element's properties. For example, the figure below shows the Font style element selected.You can now make changes to the Font style element properties. (see below).
  4. When you're finished adding and modifying style elements, click OK. The StyleSheet is added to your solution.
  5. After the StyleSheet is added to your solution, you can always change style elements by selecting the style element in the Solution Detail and modifying it in the Property Editor. 

To apply a StyleSheet to a form:

  1. Select the class that contains the form to which you want to apply the StyleSheet.
  2. Open the form in the Design Editor (double-click the form).
  3. Click in the gray area of the Design Editor to select the parent container for the form.
  4. In the Property Editor, click the Style tab.
  5. For StyleSheet, click the ellipsis button.
  6. In the Edit StyleSheet dialog box, for Project Style, click the ellipsis button.
  7. In the Select StyleSheet dialog box, expand your StyleProject and select the StyleSheet you want to apply.
  8. Click OK.
  9. In the Edit StyleSheet dialog box, click OK.

Tip You can also apply a StyleSheet to a form by dragging it directly onto an empty area of a form.

To add additional style elements:

  1. Right-click on the StyleSheet and select Add Style. The StyleSheet Design dialog box is displayed.
  2. Select the check box for the style element that you want to add. Select the name of the style element and make changes to the style's properties.
  3. Click OK when finished.

To changed previously added style elements:

  1. In the Solution Explorer, select a StyleSheet.
  2. In the Solution Detail, select the style element you want to change.
  3. In the Property Editor, change the properties for the style element.

[edit] Error Handling

 

[edit] Examples

 

[edit] Next Steps

Posting Your Application
Deploying Your Application
Managing a Deployed Application

[edit] Tags


Log in if you would like to rate this page.
    Copyright © 2005 - 2007 Bungee Labs. All rights reserved.