In this article, you will learn Xamarin native project architecture.
Introduction The Xamarin native term refers to the platform specific applications. By using Xamarin, we are able to create native applications in Android, iOS, or Windows. In native Xamarin applications, we are creating platform specific applications such as Xamarin.Android, Xamarin.iOS and Xamarin.Windows. Each native platform consists of UI / Views, which can be designed and developed in native environments; in Android, we are creating UI in .axml format, where for iOS, we are using storyboards. Thus, in this article, we will learn how to create Xamarin native project architecture. Solution Description of the architecture is given below. To create Xamarin native solutions, you need to follow the steps given below. Step 1 Open Visual Studio and create New Project. Select Cross Platform and select Blank app (native portable). In the screenshot given above, you can see the solution architecture, which consists of four projects called Portable, Droid (Android Project), iOS (iOS Project), and WinPhone(Windows Project). Here, the portable project consists of the code, which is accessible across all the platforms and the platform specific code like UI, Activity, native functionality (Bluetooth, Wi-Fi etc.).
Step 2 In this project, we are going to use MVVM library, so go to portable project and select to Add NuGet Packages. Add MvvmLightLibs. Here, we are using MVVM (Model-View-View-Model) pattern to develop the application. Step 3 Now, add the folders given below in your portable project as ViewModel, Model, Repositories, Helpers and Services. Folder Details are as follows
Now, the solution is ready to be used.
Xamarin.Forms For Beginners