Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

TcxStyleRepository Class

A repository for component styles and style sheets.

#Declaration

Delphi
TcxStyleRepository = class(
    TcxScalableComponent
)

#Remarks

A style repository is a non-visual component that stores styles applicable to Developer Express controls with support for the Styles technology. The TcxStyleRepository class allows you to create, store and access individual styles where each is presented by the TcxCustomStyle class (or its descendant). TcxCustomStyle is an abstract class. Use the TcxStyle class to create items in a repository.

Most Developer Express controls supporting Styles technology declare a Styles member. This supports a collection of style properties defining the appearance of particular control elements. Usually you have to create a style, initialize its attributes as appropriate and assign the style to the control’s style property.

Using style sheets is another way of initializing style properties of a control element. A specific style sheet is a set of styles suitable for a particular control (for instance, a TcxGridTableViewStyleSheet class specify styles for a grid view). Instead of specifying individual styles for a control element, you can assign it a style sheet thus specifying values for all style properties. To assign a style sheet to a control element, use its Styles.StyleSheet property.

You can create a style sheet programmatically using the CreateStyleSheet method. All style sheets are supported by the StyleSheets property.

The style repository editor provides you a convenient way to manipulate styles and style sheets at design time. The next image demonstrates the Style Sheets tab of the style repository editor:

See Also