Table of Contents

Class ThemeBindingManager

Namespace
DrawnUi.Draw
Assembly
DrawnUi.Maui.dll

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

int

CurrentTheme

Current theme from the active theme provider

public static AppTheme CurrentTheme { get; }

Property Value

AppTheme

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

extension ThemeBindingExtension
target BindableObject
property BindableProperty

Returns

ThemeBinding

SetThemeProvider(IThemeProvider)

Sets a custom theme provider (for Blazor, testing, etc.)

public static void SetThemeProvider(IThemeProvider themeProvider)

Parameters

themeProvider IThemeProvider

UpdateAllBindings()

Forces update of all active bindings (useful for manual theme changes)

public static void UpdateAllBindings()