Hi Salvatore Lorello,
Greetings from Syncfusion.
We have validated your query and we suggest you use
SelectionChanged or
SelectionChanging event to achieve your requirement while swiping. You can load the content of tab item by using the index returned by the Selection Changing or Selection Changed event arguments. We have created sample based on this and please find the sample from below link
Sample link: https://www.syncfusion.com/downloads/support/forum/166313/ze/TabviewSample652185305 In this sample, we have loaded content based on the selected item index in selection changing event as like below code snippet
private void tabView_SelectionChanging(object sender, Syncfusion.XForms.TabView.SelectionChangingEventArgs e) { if (e.Index == 0) { Grid callsGrid = new Grid { BackgroundColor = Color.Yellow }; tabView.Items[e.Index].Content = callsGrid; } else if (e.Index == 1) { Grid favoritesGrid = new Grid { BackgroundColor = Color.Green }; tabView.Items[e.Index].Content = favoritesGrid; } else if (e.Index == 2) { Grid contactsGrid = new Grid { BackgroundColor = Color.Blue }; tabView.Items[e.Index].Content = contactsGrid; } } |
Please check with the above and let us know if you have any concern.
Regards,
Jeya K