I have a very long list of items divided by categories. Users can choose multiple items and see selected ones on a summary side panel. I need to find a way to group items by tabs to simplify UI. But here I face a lot of issues.
-
I use Shell, so I can’t use TabbedPage concurrently because it is incompatible with .NET MAUI Shell.
-
If I use Shell Tabs then the question arises, how to use it within one ViewModel and have View parts, like the summary panel, common for all tabs. Common parts of the view have to be ‘fixed’ on the screen and do not slide when switching tabs. Technically, the tabs’ purpose here is rather a grouping than navigation, so it feels wrong to add them to the navigation tree.
-
If I use Expander, then the question is how to fix titles in one place, so they don’t slide down when one of the expanders is expanded. I don’t like the idea of making users scroll up and down searching where needed ‘tabs’ are located and I would prefer to keep them in one fixed place altogether.
*When I say ‘fixed’ I mean that they remain on screen when a user scrolls the list of items. -
If I make custom ‘tabs’ that switch categories, I face a performance issue: rendering of new list/template blocks the main thread for a while and makes the app freeze for a moment and in some cases even for seconds. I can’t even put some loading indicator because it also freezes with the main thread. Is there any way to prerender all custom tabs to be shown immediately or at least not block the main thread during rendering?
So after all, the question is what is the correct way to group some spacious lists by tabs within one ViewModel and with .NET MAUI Shell?
I tried all the listed options above and couldn’t solve the mentioned issues that appeared in each case.
Dmytro Zuiev is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.