using System; using System.Collections.Generic; using Xamarin.Forms; namespace TheGameExtreme.view { public partial class Settings : ContentPage { public Settings() { InitializeComponent(); } private void CBBr_CheckedChanged(object sender, CheckedChangedEventArgs e) { if(CBBr.IsChecked == true) { CBFr.IsChecked = !CBBr.IsChecked; } } private void CBFr_CheckedChanged(object sender, CheckedChangedEventArgs e) { if(CBFr.IsChecked == true) { CBBr.IsChecked = !CBBr.IsChecked; } } private void WhiteTheme() { pageContentSetting.Style = Application.Current.Resources["MyBackGroundColorStyle2"] as Style; lbColor0.Style = Application.Current.Resources["ColorLabelWhite"] as Style; lbColor1.Style = Application.Current.Resources["ColorLabelWhite"] as Style; lbColor2.Style = Application.Current.Resources["ColorLabelWhite"] as Style; lbColor3.Style = Application.Current.Resources["ColorLabelWhite"] as Style; lbColor4.Style = Application.Current.Resources["ColorLabelWhite"] as Style; //ChangeBackGroundColorHomePage(); } private void ChangeBackGroundColorHomePage() { } private void Switch_Toggled_Theme(object sender, ToggledEventArgs e) { if (swTheme.IsToggled == true) { pageContentSetting.Style = Application.Current.Resources["MyBackGroundColorStyle"] as Style; lbColor0.Style = Application.Current.Resources["ColorLabelDark"] as Style; lbColor1.Style = Application.Current.Resources["ColorLabelDark"] as Style; lbColor2.Style = Application.Current.Resources["ColorLabelDark"] as Style; lbColor3.Style = Application.Current.Resources["ColorLabelDark"] as Style; lbColor4.Style = Application.Current.Resources["ColorLabelDark"] as Style; } else { WhiteTheme(); } } } }