is it possible to desing UI in native project and the rest pf the code in PCL for xamarin.forms ?

I am developing for Android and IOS and i want to ask which is the best approach to design the UI? there are not a lot of libraries that support UI in PCL project, and it seems better to design the UI natively for each the android and IOS.
Would this approach effect the business logic and data that i would develop in the PCL project and when i want to communicate with the UI would that mean i should write the code twice for each UI since the ID(s) are different for the UI views ?


  • lukiluki USMember ✭✭
    edited July 2017

    You can use the same logic written in C# if classes wich you use will be aviliable for all platforms ;)

    I think if you want write the UI natively for all platforms you have to use Xamarin.Android project/Xamarin.iOS project, because you will have to write UI support code for all platforms separately.

    Of course, you can put the shared code in a separate project and attach it to projects of native applications.

  • Amar_BaitAmar_Bait DZMember ✭✭✭✭✭

    In that case you don't need to use Xamarin.Forms. Just use Xamarin.iOS and Xamarin.Android directly.

  • @nadjib
    the idea is to maximize the shared code and have access to as many native UI libraries for both the IOS and android. i want to use Xamarin.forms and access as many UI native features as possible.That is why i am asking about the possibility of this approach and if its valid which is " do UI natively and develop the data model and business logic in portable project"

  • @luki
    what do you mean by i have to write the UI support code for all platforms separately?

  • lukiluki USMember ✭✭

    @AbdullaAlathamnah said:
    what do you mean by i have to write the UI support code for all platforms separately?

    You have to handle events, load data to UI etc.

  • @luki then we are back to being in native application development, whats the use of cross platform and Xamarin.forms approach then.

Sign In or Register to comment.