While having all this cross-platform user interface behavior and code sharing, sometimes you still need to completely customize a page and blend it with native pages.
In this recipe, we will create an example of loading native platform views for iOS XIB, Android AXML, and Windows Phone UserControl
interfaces.
Create your cross-platform Xamarin.Forms application using a PCL to share code in Visual Studio or Xamarin Studio; let's name it
XamFormsNativePages
. We used Visual Studio in this example, as it's so easy to have all three projects ready for development!Create a page to use it as our host
MainPage
. Right-click in the core PCL library and Add | Class…, and name itMainPage
.Use the following code. Here, we create a
BindableProperty
and aButtonPressed
event.public class MainPage : Page { public static readonly BindableProperty RandomNumberProperty = BindableProperty.Create("RandomNumber", typeof(int), typeof(MainPage), 0); public int...