Esempio n. 1
0
        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();
        }
Esempio n. 2
0
        protected override void OnInitialized()
        {
            base.OnInitialized();

            var theme = Application.Current.RequestedTheme;

            DebugPage.WriteLine($"Current theme: {theme}");
        }