[]
        
(Showing Draft Content)

C1.Win.C1Themes.C1ThemeController.ApplyThemeToControlTree

ApplyThemeToControlTree Method

ApplyThemeToControlTree(Control, C1Theme, Predicate<Control>, bool)

Recursively applies a theme to a control and its children. Controls that do not support themes are ignored (but the theme is applied to their children).

Declaration
public static void ApplyThemeToControlTree(Control root, C1Theme theme, Predicate<Control> applyThemeToSubTree = null, bool applyToChildren = false)
Parameters
Type Name Description
Control root

The root control to apply the theme to.

C1Theme theme

The theme to apply.

Predicate<Control> applyThemeToSubTree

Predicate which, if specified, allows to break theme application on certain nodes in the tree if it returns false.

bool applyToChildren

If true, applies the theme to children regardless of whether the theme has been applied to the parent.