I am looking for a way to have an element (DXPopup) injected to every page while using Xamarin Forms Shell.
My initial thought would be to create a custom renderer for Tabbar and inject the popup above the tabbar. But I hit a blocker when my tabs are contained in a FlyoutItem. I then thought about a custom renderer for ContentView and add a child element, though hit a blocker where Android wanted an android view.
How would be best to tackle this issue?
Desired outcome: DXpopup element added to every page, so we can call a common show method (by message of mediator class)
I solved this using Jason's suggested route above:
Basepage - that had a control template Control Template like:
Register to the binding context changing (in code behind of base page): BindingContextChanged += SetBindingContext;
This was to update to the consuming pages viewmodel.
Said viewmodel would have a baseViewmodel, where I registered the element injected like so:
This in turn allowed me to use the viewmodel base to interact with the element (in my case showing it)