private void OnRequestedThemeChanged(object sender, AppThemeChangedEventArgs e) { DebugPage.WriteLine($"Theme changed on {GetType().Name} to: {e.RequestedTheme}"); // Re-render UI when app theme changes between dark/light StateHasChanged(); }
protected override void OnInitialized() { base.OnInitialized(); var theme = Application.Current.RequestedTheme; DebugPage.WriteLine($"Current theme: {theme}"); }