Themes for WinForms | ComponentOne
C1.Win.Themes.8 Assembly / C1.Win.Themes Namespace / C1ThemeController Class / ApplyThemeToControlTree Method
The root control to apply the theme to.
The theme to apply.
Predicate which, if specified, allows to break theme application on certain nodes in the tree if it returns false.
If true, applies the theme to children regardless of whether the theme has been applied to the parent.

In This Topic
    ApplyThemeToControlTree Method (C1ThemeController)
    In This Topic
    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).
    Syntax
    'Declaration
     
    Public Shared Sub ApplyThemeToControlTree( _
       ByVal root As System.Windows.Forms.Control, _
       ByVal theme As C1Theme, _
       Optional ByVal applyThemeToSubTree As System.Predicate(Of Control), _
       Optional ByVal applyToChildren As System.Boolean _
    ) 
    public static void ApplyThemeToControlTree( 
       System.Windows.Forms.Control root,
       C1Theme theme,
       System.Predicate<Control> applyThemeToSubTree,
       System.bool applyToChildren
    )

    Parameters

    root
    The root control to apply the theme to.
    theme
    The theme to apply.
    applyThemeToSubTree
    Predicate which, if specified, allows to break theme application on certain nodes in the tree if it returns false.
    applyToChildren
    If true, applies the theme to children regardless of whether the theme has been applied to the parent.
    See Also