Xamarin Forms: Public C# Properties Missing on Android

While working on the mobile apps for McAllen Next (my new side project, stay tuned for more soon!), I discovered a very strange issue when running the app on Android; I kept getting repeated errors like this:

Binding: ‘IsLoading’ property not found on ‘RegionModel’, target property: ‘Xamarin.Forms.Label’

and as such, the UI would not bind and would render an empty label (or not at all, depending on the control).

At first I thought it was because the app wasn’t rebuilding properly, resulting in stale binaries as was suggested in a StackOverflow post I found while trying to find a fix.

Eventually I posted my own question about this issue and I swear before two minutes passed, I was provided the solution by a very helpful user Gusman.

Turns out I had the box checked in the Android properties for the project to link both SDK and User assemblies.

xamarin-forms-android-link-sdk-user-assemblies

Apparently this optimizes the selected assemblies, removing references to properties that the linker detects are not in use.

I don’t remember much from my college days when we built a compiler, but although optimization sounds great, completely deleting references is strange to me, especially if they’re going to be bound at runtime to the XAML as they are when working with Xamarin Forms…

But hey I’m not a compiler builder, so I changed the option to only link SDK assemblies, and everything is back to normal!

As always, I hope this is helpful, and thanks for reading!

Creating Global Resources for Xamarin Forms Apps

In our last post (Creating Device-Specific Properties in Cross-Platform Apps with Xamarin Forms) we looked at how we can leverage Page Resources to create device-specific properties that can be reused across the page. Today we’ll look at how we can convert these and other reusable property definitions to global resources so that all of an apps resources can be maintained from a single location.

Read more at the Falafel Software Blog: Creating Global Resources for Xamarin Forms Apps

Creating Device-Specific Properties in Cross-Platform Apps with Xamarin Forms

The previous post Cross-Platform Apps with Xamarin Forms and Azure Mobile Services demonstrated a simple Xamarin forms app to store and manage rebates. However, there were a few issues that impeded the user experience that should be polished up.

Specifically, there are some discrepancies between the different platforms, such as different font sizes as well as a missing Page title on the Windows Phone version.

Today we’ll look at how we can create and use page resources to create device-specific properties allowing us to update the Rebate Reminder app to create a more unified user experience.

Read more at the Falafel Software Blogs: Creating Device-Specific Properties in Cross-Platform Apps with Xamarin Forms

Cross-Platform Apps with Xamarin Forms and Azure Mobile Services

Inspired by Jesse Liberty’s fantastic blog series on learning Xamarin Forms, I decided to explore developing a fully cross-platform app of my own using Xamarin Forms. I thought it would be useful to explore how I can leverage Azure Mobile Services within the app to create a unified experience for a user regardless of which device they use, and allow their data to travel with them.

For this app, I’ve chose to resurrect the very first app I ever developed, Rebate Reminder. I wrote this app YEARS ago when was first starting out as a developer, and was an old Windows Forms VB app I wrote in .NET 1.1! I promised myself I would revisit it and make a REAL app of it someday, and it looks like that time is now!

Read more at the Falafel Software Blog: Cross-Platform Apps with Xamarin Forms and Azure Mobile Services

Porting a Windows App Studio Universal App to Android Using Xamarin

Microsoft’s App Studio is a fantastic tool to help you design and generate applications for Windows Phone as well as Universal Apps for both the phone and Windows. The online interface allows you to add content like RSS feeds, Facebook pages, Flicker photos and more with a few clicks, generating a complete Visual Studio solution that can immediately be launched on the phone or desktop.

Today we’ll look at how we can enhance the App Studio solution’s Portable Class Library so that we can use Xamarin to add an Android version of the app.

Read more at the Falafel Software Blog: Porting a Windows App Studio Universal App to Android Using Xamarin

Xamarin Error: InitializeComponent does not exist in the current context

If you are working with Xamarin, perhaps in a shared environment, you may come across a new Forms Xaml Page that is in the file system but not yet included in your project. When you proceed to “Include in Project”, you may then encounter this error in the constructor of the ContentPage:

InitializeComponent does not exist in the current context

Read more at the Falafel Software Blogs: Xamarin Error: InitializeComponent does not exist in the current context