Пример #1
0
        private void OnRequestedThemeChanged(object sender, XF.AppThemeChangedEventArgs e)
        {
            var theme = e.RequestedTheme;

            if (theme == XF.OSAppTheme.Unspecified)
            {
                ((FrameworkElement)Window.Current.Content).RequestedTheme = ElementTheme.Default;
                return;
            }

            ((FrameworkElement)Window.Current.Content).RequestedTheme = theme == XF.OSAppTheme.Dark ? ElementTheme.Dark : ElementTheme.Light;
        }
Пример #2
0
 void ThemeChanged(object sender, AppThemeChangedEventArgs e)
 {
     Device.BeginInvokeOnMainThread(() => ApplyCore());
 }