With the Q1 2010 Release of the RadControls for WinForms, we are bringing you a powerful new version of Visual Style Builder (VSB). This new version of VSB makes building themes a breeze with its new Theme Repositories feature. Today I thought I would spend some time going over the basics of VSB and its new system of Theme Repositories.

Theme Repositories

In previous versions of VSB, it was only possible to change theme properties on a per-element basis. This means that when building a theme, you actually had to select each individual element of every single control and modify its properties separately. With the new version of VSB, we've overcome the shortcomings of this approach by creating the Theme Repository. A Theme Repository is a reusable container for property settings that can be applied to elements and primitives based on the Telerik Presentation Framework (TPF). Currently, there are five types of repositories.

Fill Repository

Applies To: Elements that support FillPrimitive
Purpose: Defines how an element should be filled.

Fill Repository

Figure 1. Creating a Fill Repository

Border Repository

Applies To: Elements that support BorderPrimitive
Purpose: Defines what an elements borders should look like.

Border Repository

Figure 2. Creating a Border Repository

Arrow Repository

Applies To: Elements that support ArrowPrimitive.
Purpose: Defines what an elements arrows should look like.

Arrow Repository

Figure 3. Creating an Arrow Repository

Text Repository

Applies To: Elements that support TextPrimitive.
Purpose: Defines the font/text properties that should be used in an element.

Text Repository

Figure 4. Creating a Text Repository

Image Repository

Applies To: Elements that support ImagePrimitive.
Purpose: Defines the properties for an image that should be used in an element.

Image Repository

Figure 5. Creating an Image Repository

Working with Theme Repositories

One of the primary benefits of Theme Repositories is that they are extremely easy to work with. To create a theme repository, you simply need to select the particular element of a control that you would like to create the repository for. Once doing so, clicking the "Create Repository" button will display a dialog that allows you to create a repository specific to the type of primitive(s) the selected element can use.

After you've created a repository, you can apply it to your object by drag-and-dropping it over the element state you would like it to be applied for. You can reuse your theme repositories as many times as you'd like wherever they are supported in the RadControls for WinForms.

Applying a Theme Repository

Figure 6. Working with Theme Repositories

So, as you can see, building themes becomes a breeze when working with Theme Repositories...


Comments

Comments are disabled in preview mode.