private async void tabview_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { if (e.Index == 2) { // vm.IsRunning = true; //vm.GetContacts(); int userid = Preferences.Get("UserID", 0); // ChatItems = null; if (Preferences.Get("UserType", 0) == 1) { var newList = await ChatService.GetContactsEmployeeAsync(userid); vm.ChatItems = newList; //vm.ChatItems = await ChatService.GetContactsEmployeeAsync(userid); } else if (Preferences.Get("UserType", 0) == 2) { var newList = await ChatService.GetContactsEmployerAsync(userid); vm.ChatItems = newList; //vm.ChatItems = await ChatService.GetContactsEmployerAsync(userid); } vm.IsVisible = vm.ChatItems.Count == 0 ? true : false; // vm.IsRunning = false; //Actualiza la lista de contactos //MessagingCenter.Send<MainEmployeeView>(this, "Hi"); //GetCandidatesLiked(Preferences.Get("UserID", 0)); } }
private async void tabview_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { if (e.Index == 2) { // vm.IsRunning = true; //vm.GetContacts(); int userid = Preferences.Get("UserID", 0); // ChatItems = null; if (Preferences.Get("UserType", 0) == 1) { var newList = await ChatService.GetContactsEmployeeAsync(userid); foreach (var item in newList) { item.ContadorVisible = item.CuentaMensajes > 0 ? true : false; } vm.ChatItems = newList; //vm.ChatItems = await ChatService.GetContactsEmployeeAsync(userid); } else if (Preferences.Get("UserType", 0) == 2) { var newList = await ChatService.GetContactsEmployerAsync(userid); vm.ChatItems = newList; //vm.ChatItems = await ChatService.GetContactsEmployerAsync(userid); } vm.IsVisible = vm.ChatItems.Count == 0 ? true : false; } }
private void TabContents_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { switch (e.Index) { case 0: TabContents.Items[0].ImageSource = "ic_library_selected.png"; TabContents.Items[1].ImageSource = "ic_home.png"; TabContents.Items[2].ImageSource = "ic_search.png"; break; case 1: { TabContents.Items[0].ImageSource = "ic_library.png"; TabContents.Items[1].ImageSource = "ic_home_selected.png"; TabContents.Items[2].ImageSource = "ic_search.png"; break; } case 2: { TabContents.Items[0].ImageSource = "ic_library.png"; TabContents.Items[1].ImageSource = "ic_home.png"; TabContents.Items[2].ImageSource = "ic_search_selected.png"; break; } } }
private async void PositionTabBar_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { if (e.Index == 0 && !this.PackmanView.IsVisible) { //Output an alert dialogue that will force the user back into the settings page, considering that the place function must occur before anything else await AlertHelper.ShowAlertDialogueAsync("You must place the packman first, somewhere on the screen by completing the form on the settings page", "Place function is missing"); this.PositionTabBar.SelectedIndex = 1; } else if (e.Index == 1) { ScreenWidth = this.XPositionView.MaxValue = Application.Current.MainPage.Width; ScreenHeight = this.YPositionView.MaxValue = Application.Current.MainPage.Height - 110; await IoC.Get <IEventAggregator>() .PublishOnUIThreadAsync(new PackmanGridDataHandler() { GridHeight = ScreenHeight }); //Since this Grid Height applies only to the this page, and not to any others, //Then use EventAggregation instead of a constant ApplicationConstants.Origin = new Point(0, ScreenHeight); } }
void OnTab_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { switch (e.Index) { case 0: ProductFilters.Instance.ProductType = ProductType.None; break; case 1: ProductFilters.Instance.ProductType = ProductType.WillBeExpired; break; case 2: ProductFilters.Instance.ProductType = ProductType.Expired; break; case 3: ProductFilters.Instance.ProductType = ProductType.Deleted; break; default: break; } Console.WriteLine($"SELECTED TAB: {e.Index}"); Task.Run(async() => { await viewModel.LoadData(); }); }
private void SfTabView_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { if (e.Index == 1) { _ = scrollView.ScrollToAsync(0, 0, true); } }
}/// <summary> /// Metoda která filtruje na základě změny selectoru /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void SfTabView_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { int sectionId = viewmModel.Sekces.Where(x => x.name == e.Name).Select(x => x.id).FirstOrDefault(); //načti id z listu SfGrid.IsBusy = true; //zastav grid var s = viewmModel.Polozkas.Where(x => x.sectionId == sectionId).Select(x => x); //aplikuj filtr SfGrid.ItemsSource = s; SfGrid.IsBusy = false; }
/// <summary> /// Invoked when tab view selection items are changed. /// </summary> private void TabView_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { if (Device.RuntimePlatform == Device.Android || Device.RuntimePlatform == Device.iOS) { if (e.Name == "Sign Up") { this.frame.HeightRequest = 480; } else if (e.Name == "Login") { this.frame.HeightRequest = 390; } } }
/// <summary> /// Tabs the view selection changed. /// </summary> /// <param name="sender">Sender.</param> /// <param name="e">E.</param> void TabViewSelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { var tabView = (sender as Syncfusion.XForms.TabView.SfTabView); for (int i = 0; i < tabView.Items.Count; i++) { var tabItem = (sender as Syncfusion.XForms.TabView.SfTabView).Items[i]; StackLayout headerLabel = (tabItem.HeaderContent as StackLayout); Label label = (headerLabel.Children[0] as Label); if (i == e.Index) { label.TextColor = Color.FromHex("#4285F4"); } else { label.TextColor = Color.Black; } } }
void tabView_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { var currentIndex = e.Index; var previousTab = GetTab(_previousIndex); previousTab?.OnPause(); var currentTab = GetTab(currentIndex); if (currentTab != null) { if (visitedTabs.Contains(currentIndex)) { currentTab.OnResume(); } else { visitedTabs.Add(currentIndex); currentTab.OnStart(); } } _previousIndex = currentIndex; }
private void Signuptabview_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { signuptabview.SelectedIndex = e.Index; currentIndex = e.Index; }
public void ChangeIcon(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { // Tab1.ImageSource. }
private void tabView_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { var selectedIndex = e.Index; }
private void SfTabView_SelectionChanged(object sender, Syncfusion.XForms.TabView.SelectionChangedEventArgs e) { }