private async void TapGestureRecognizer_Perkataan_Tapped(object sender, EventArgs e) { try { if (nSelectTabIndex == 3) { return; } Device.BeginInvokeOnMainThread(() => { var content = new IngatView(); ChangeContent.Content = content; SetTabTextColor(3); }); } catch { } }
public MainPage() { InitializeComponent(); try { HangulcontentView = new HangulBaseListView(); //스킨 설정 InitSkinStyle(); //------------ MessagingCenter 해제 //스킨 변경 MessagingCenter.Unsubscribe <MainPage>(this, "SkinStyle"); //설정이 끝나면 현재뷰 초기화 MessagingCenter.Unsubscribe <MainPage>(this, "ChangeSetting"); //------------ MessagingCenter 설정 //스킨 변경 MessagingCenter.Subscribe <MainPage>(this, "SkinStyle", (sender) => { InitSkinStyle(); }); //설정이 끝나면 현재뷰 초기화 MessagingCenter.Subscribe <MainPage>(this, "ChangeSetting", (sender) => { if (ChangeContent.Content.ToString() == "bahasaKorea.Views.HangulBaseListView") { /* * var content = new HangulBaseListView(); * ChangeContent.Content = content; * SetTabTextColor(1); */ HangulcontentView.ChangeSkin(); ChangeContent.Content = HangulcontentView; SetTabTextColor(1); } else if (ChangeContent.Content.ToString() == "bahasaKorea.Views.AlfabetView") { var content = new AlfabetView(); ChangeContent.Content = content; SetTabTextColor(2); } else if (ChangeContent.Content.ToString() == "bahasaKorea.Views.IngatView") { var content = new IngatView(); ChangeContent.Content = content; SetTabTextColor(3); } else if (ChangeContent.Content.ToString() == "bahasaKorea.Views.KamusView") { var content = new KamusView(); ChangeContent.Content = content; SetTabTextColor(4); } }); NavigationPage.SetHasNavigationBar(this, false); SetTabTextColor(4); //SetTabTextColor(1); //Random Twister //Navigation.PushModalAsync(new TongueTwisterPage(), true); //Navigation.PushModalAsync(new WelcomePage(), true); } catch { } }