private void ChangeTheme() { Status = ""; try { var settings = new SettingsBLL(resourceContextForCurrentView); var theme = settings.GetTheme(); if (theme == "Dark") { AppShell.Current.RequestedTheme = ElementTheme.Light; settings.SaveTheme("Light"); } else { AppShell.Current.RequestedTheme = ElementTheme.Dark; settings.SaveTheme("Dark"); } } catch (Exception ex) { Status = ex.Message; } }
private void CheckThemeSettings() { var BLL = new SettingsBLL(); var settings = BLL.GetTheme(); if (settings == "Dark") { this.RequestedTheme = ElementTheme.Dark; } else { this.RequestedTheme = ElementTheme.Light; } }