Adding a page title for WinPhone in Xamarin.Forms

I’ve been playing with Xamarin.Forms for the last few days. While it is pretty impressive that you can build an iPhone, Android and WinPhone app from the same codebase, I get a feeling that WinPhone is a second class citizen. One of the first things that bugged me is that you do not get the standard WinPhone page titles “for free”. Here is some XAML to fix that:

<!-- WinPhone page title -->
       <OnPlatform x:TypeArguments="x:Boolean">
   <Label Text="APPLICATION TITLE" TranslationX="4" TranslationY="4" />
   <Label Text="page title" Font="64" TranslationY="-12"/>

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s