Table of Contents

Method BindThemeTo

Namespace
Velvet
Assembly
Velvet.Docs.dll

BindThemeTo(VisualElement)

Keeps root carrying the DarkThemeClass class exactly while IsDark holds, which is what selects the sheet's dark token set for root's subtree. AttachTo(VisualElement) calls this; a project that reaches the sheet from a scene reference instead calls it itself. Binding one element twice is harmless.

public static void BindThemeTo(VisualElement root)

Parameters

root VisualElement