New to Telerik UI for WinFormsStart a free 30-day trial

Definition

Namespace:Telerik.WinControls

Assembly:Telerik.WinControls.dll

Syntax:

C#
public class StyleGroup

Inheritance: objectStyleGroup

Constructors

Initializes a new instance of the StyleGroup class.

C#
public StyleGroup()

Initializes a new instance of the StyleGroup class by specifying an element type. Creates a new ElementTypeDefault registration.

C#
public StyleGroup(string elementType)
Parameters:elementTypestring

The element type.

Initializes a new instance of the StyleGroup class by using an existing StyleGroup instance.

C#
public StyleGroup(StyleGroup styleGroup)
Parameters:styleGroupStyleGroup

The StyleGroup to be used as a source.

Initializes a new instance of the StyleGroup class by adding a default style registration.

C#
public StyleGroup(StyleRegistration registration)
Parameters:registrationStyleRegistration

The default style registration.

Properties

Gets a collection with property setting groups for the style group.

C#
public List<PropertySettingGroup> PropertySettingGroups { get; }

Gets a collection with style registrations for the style group.

C#
public List<StyleRegistration> Registrations { get; }

Methods

Combines the style group with a specified style group by adding its property setting groups.

C#
public void Combine(StyleGroup group, bool replaceExistingStyles)
Parameters:groupStyleGroup

style group to combine with.

replaceExistingStylesbool

Specifies whether to replace existing styles.

Creates a new style sheet based on this style group for the specified element.

C#
public StyleSheet CreateStyleSheet(RadObject element)
Parameters:elementRadObject

The element.

Returns:

StyleSheet

An instance of StyleSheet if successful.

Creates a new theme which is a cloned version of all styles existing in this style group.

C#
public Theme CreateTheme(string name)
Parameters:namestring

The name of the new theme.

Returns:

Theme

An instance of the Theme class if successfull.

Determines whether the style group is compatible with the specified control.

C#
public bool IsCompatible(Control control)
Parameters:controlControl

The control.

Returns:

bool

true if the style group is compatible.

Determines whether the style group is compatible with the specified stylable node.

C#
public bool IsCompatible(IStylableNode item)
Parameters:itemIStylableNode

The stylable node.

Returns:

bool

true if the style group is compatible.

Determines whether the style group is compatible with the specified control type.

C#
public bool IsCompatible(string controlType)
Parameters:controlTypestring

The control type.

Returns:

bool

true if the style group is compatible.

Determines whether the style group is compatible with the specified style group.

C#
public bool IsCompatible(StyleGroup dstGroup)
Parameters:dstGroupStyleGroup

The stye group.

Returns:

bool

true if the style group is compatible.

Saves all style settings presented in this group in a file with XML formatting.

C#
public void SaveXML(string themeName, string fileName)
Parameters:themeNamestring

The theme name to be stored in the file.

fileNamestring

The name of the file to be created.