Class ThemeBindingManager
Simplified theme binding manager using DrawnUI's disposal mechanism No periodic cleanup needed - controls clean up themselves!
public static class ThemeBindingManager
- Inheritance
-
ThemeBindingManager
- Inherited Members
Properties
ActiveBindingCount
Gets the current number of active bindings (for diagnostics)
public static int ActiveBindingCount { get; }
Property Value
CurrentTheme
Current theme from the active theme provider
public static AppTheme CurrentTheme { get; }
Property Value
Methods
Cleanup()
Manually triggers cleanup of dead references
public static void Cleanup()
CreateBinding(ThemeBindingExtension, BindableObject, BindableProperty)
Creates and registers a new theme binding
public static ThemeBinding CreateBinding(ThemeBindingExtension extension, BindableObject target, BindableProperty property)
Parameters
extensionThemeBindingExtensiontargetBindableObjectpropertyBindableProperty
Returns
SetThemeProvider(IThemeProvider)
Sets a custom theme provider (for Blazor, testing, etc.)
public static void SetThemeProvider(IThemeProvider themeProvider)
Parameters
themeProviderIThemeProvider
UpdateAllBindings()
Forces update of all active bindings (useful for manual theme changes)
public static void UpdateAllBindings()