Reputation: 288
I am currently new to Xamarin. I have learned to develop both on Xamarin.Android - Xamarin.iOS and Xamarin.Forms. My background comes from native Android apps (Java) and iOS apps(Swift). My question is can I use Xamarin.Forms for basic UI and at the same time Xamarin.Native for more complicated UI on the same project? More specific can I combine all the Xamarin technologies on UI perspective on the same project?
Upvotes: 6
Views: 1945
Reputation: 9990
You can. You need to create standard Xamarin.iOS + Xamarin.Android projects and add to them Xamarin.Forms NuGet. You can add Xamarin.Forms pages in the shared project, create those classes in the native projects and transform them to UIViewController
or Fragment
. More here https://developer.xamarin.com/guides/xamarin-forms/platform-features/native-forms/
Just to note that this isn't in any kind of preview.
Upvotes: 3
Reputation: 86
Yes you can, easily. Use Xamarin native MVVMCross for your application architecture, then you can use custom presenters to present either a native view, or a Xamarin.Forms view. It's extremely flexible, easy to use, and beautiful.
Check out this video by Xamarin MVP Martijn van Dijk: https://www.youtube.com/watch?v=C0VW11yv2AI
Upvotes: 2
Reputation: 74144
More specific can I combine all the Xamarin technologies on UI perspective on the same project?
Yes, but those features are currently in a preview state, buyer beware ;-)
Embedding Xamarin.Forms in Xamarin Native
https://blog.xamarin.com/unleashed-embedding-xamarin-forms-in-xamarin-native/
Xamarin.Forms
3.0 of Embedding is currently in preview and is available via a custom Nuget feed.
Upvotes: 6
Reputation: 3070
Yes, you can do it by using custom renderers.
From a personal point of view, if you find yourself in the need of having a very customised UI, and so use a lot of renderers, I'd completely skip Xamarin Forms. It is very good for prototyping and simple apps, otherwise it is not so easy to deal with the additional complexity of using custom renderers.
Upvotes: 4