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
{{ message }}
This repository has been archived by the owner on May 1, 2024. It is now read-only.
As you can see in the current Xamarin PageExtensions available for Android and iOS, Xamarin allows you to convert any type of Xamarin.Forms(XF) Page to a native ViewController in iOS, but it only allows converting a XF ContentPage to a native Fragment in Android.
The XF Page plays a major role when you are trying to implement an XF NavigationPage or TabbedPage allowing for a dashboard with tabs and subsequently being able to navigate between pages without having to go back into native code. So, currently I can handover complete control to XF on iOS, but on Android I can only use XF to display a single ContentPage with no control over navigation.
My request is to extend the API to allow opening an XF Page from Xamarin.Android, rather than just a ContentPage.
API Changes
This would require creating an overridden constructor in the Xamarin.Forms.Platform.Android /AppCompat/PageExtensions.cs file referenced above that would take a Page and instead of a ContentPage. I am not sure of the other changes this would require to make this happen in the Xamarin.Forms.Platform.Android project.
Intended Use Case
This would be great for teams trying to use XF Embedding to convert projects from using Xamarin.Native to XF, for easier maintenance & implementation of features.
Thanks for this suggestion! As Xamarin.Forms is now in maintenance mode, this will not happen anymore for Xamarin.Forms. We're only adding bugfixes and stability fixes.
If this is still important to you, make sure to check the .NET MAUI repo and see if it's already on the roadmap. If not, feel free to open a discussion to discuss a change first or open an issue with a detailed feature request. Thanks!
Summary
As you can see in the current Xamarin PageExtensions available for Android and iOS, Xamarin allows you to convert any type of
Xamarin.Forms
(XF)Page
to a nativeViewController
in iOS, but it only allows converting a XFContentPage
to a nativeFragment
in Android.The XF
Page
plays a major role when you are trying to implement an XFNavigationPage
orTabbedPage
allowing for a dashboard with tabs and subsequently being able to navigate between pages without having to go back into native code. So, currently I can handover complete control to XF on iOS, but on Android I can only use XF to display a singleContentPage
with no control over navigation.My request is to extend the API to allow opening an XF
Page
fromXamarin.Android
, rather than just aContentPage
.API Changes
This would require creating an overridden constructor in the
Xamarin.Forms.Platform.Android /AppCompat/PageExtensions.cs
file referenced above that would take aPage
and instead of aContentPage
. I am not sure of the other changes this would require to make this happen in theXamarin.Forms.Platform.Android
project.Intended Use Case
This would be great for teams trying to use XF Embedding to convert projects from using
Xamarin.Native
to XF, for easier maintenance & implementation of features.Added Explanation: You can open NavigationPages on iOS, as you can see in this sample here which allows using functions like
PushAsync
orPopAsync
, by simply doing:So for Android as seen here, currently we can only do this: ✅
and we need to create a way to do something like this: ❌
PS: Here's a sample Github that contains a playground created as a Spike. If someone knows of a work around, please let me know.
The text was updated successfully, but these errors were encountered: