my goal is to create a page with a SfTabView control having a dynamic number of SfTabItem, read from a SQLite local database.Each SfTabItem has a custom header a a ListView as content. The page is binded with a ViewModel, in which I loop the data and create the SfTabItems.
I succesfully created the page structure, I can read from the database and populate the tabview control with a TabItemCollection field of the ViewModel. My problem is that when I try to add an ItemTapped event to the listview, nothing gets called. I tried everything: ItemTapped event, SelectedItem property, EventToCommandBehavior attached, gestures, ...
Attached to this post there's an excerpt
of my code, containing the relative part of the issue. The weird thing
is that in this code the ItemTapped event is correctly fired, while the
SelectionChanged event on the SfTabView is not fired.
How can I obtain my goal correctly? Am I missing something?
I hoped there were something like this for SfTabView control, but no luck...
PAPaul Anderson S Syncfusion Team December 18, 2018 12:31 PM UTC
Greetings from Syncfusion.
Query 1: SelectionChanged event on the SfTabView is not fired.
We have already faced the reported issue in the older versions and this issue has been fixed in the latest version (18.104.22.168). So please upgrade to the latest version (22.214.171.124) to resolve this issue.
Query 2: I hoped there were something like SfTabControl.
Your requirement can be achieved by using the SelectionColor and selection indicator’s position property. When analyzing the given sample, we found that you have used custom tab header view for all tab headers. When using custom tab header view, the SelectionColor and selection indicator’s position properties won’t apply. So, your requirement can be achieved only when using normal tab header. We have prepared the sample based on your requirement. Please have the sample from the below link.
Please check the sample and let us know if you have any concerns. Also, please tell us for what purpose you have used custom tab header view.
Query 3: ItemTapped event of the listview is not called.
We are unable to reproduce the reported issue from our side. We prepared the sample to show that the events are fired correctly. Please have the sample from the below link.