You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On the very left, there is the "main" menu with all top level navigation. The section in the middle (the white one) represents the current selected area. In MAUI this could be done by using a flyout menu and the selected section would be the current content page.
But how to implement the right section (Gray area) and maybe event the tab in this section as well!?
There is no, at least none I'm aware of, way of embedding content pages into other content pages (when using MAUI Shell), but maybe #6389 will change that in the future.
And implementing this purely with views would loose the benefit of some page life cycle events (which are forwarded to our VMs). We could try to re-implement some custom events to tell a viewmodel, when it's view is displayed or use the CommunityToolkit for these things, but we want to stick with url based navigation and be as close as the MAUI way of things as possible.
We can also keep the one 'detail page view' on the right, but replaces the binding context on every change in the middle section...which also seems to be a bit hacky when the content on the right changes in layout etc.
We looked a different implementation ideas, but none fulfilled all our requirements. The solution:
Must be compatible with the Shell (because we really love it)
Must support URL based navigation (navigating to this Page and preselect a content)
Must be conform with MVVM approaches.
Should make page lifecycle events accessible for the VM to respond to (at least in a minimal way, following MVVM pattern)
Should be adaptable from our current ContentPage based approach with minimal effort
The closest thing we saw recently would be the "regions" from Prism.MAUI, but I personally have the feeling something like this should be integrated into MAUI without bringing in all the other parts of Prism, which we don't need (at the moment)!?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We are currently investigating what the best way of implementing complex layouts with MAUI would be.
Our UX requirements are quite similar to the layout of Microsoft Teams, so maybe I can try to explain what we need by using this:
(borrowed from Microsoft https://support.microsoft.com/en-us/topic/turn-in-an-assignment-in-microsoft-teams-e25f383a-b747-4a0b-b6d5-a2845a52092b)
On the very left, there is the "main" menu with all top level navigation. The section in the middle (the white one) represents the current selected area. In MAUI this could be done by using a flyout menu and the selected section would be the current content page.
But how to implement the right section (Gray area) and maybe event the tab in this section as well!?
There is no, at least none I'm aware of, way of embedding content pages into other content pages (when using MAUI Shell), but maybe #6389 will change that in the future.
And implementing this purely with views would loose the benefit of some page life cycle events (which are forwarded to our VMs). We could try to re-implement some custom events to tell a viewmodel, when it's view is displayed or use the CommunityToolkit for these things, but we want to stick with url based navigation and be as close as the MAUI way of things as possible.
We can also keep the one 'detail page view' on the right, but replaces the binding context on every change in the middle section...which also seems to be a bit hacky when the content on the right changes in layout etc.
We looked a different implementation ideas, but none fulfilled all our requirements. The solution:
As a former iOS developer my initial idea would be something like the custom container view controller (see https://developer.apple.com/documentation/uikit/view_controllers/creating_a_custom_container_view_controller?language=objc), but I didn't have the time yet to port my first attempt (collecting some implementation ideas from GitHub) https://github.com/planerde/XamarinFormsPageContainer to MAUI...
The closest thing we saw recently would be the "regions" from Prism.MAUI, but I personally have the feeling something like this should be integrated into MAUI without bringing in all the other parts of Prism, which we don't need (at the moment)!?
Beta Was this translation helpful? Give feedback.
All reactions