Inject Static Libraries And Plugins In Xamarin (Prism.Forms)

When using a container for dependency injection in your Xamarin.Forms app, you may find yourself trying to use a plugin or library that is static that you want to register with your container. Having statics in our code makes it hard to test and causes coupling. In this post, I will demonstrate using Prism.Forms how to inject a static plugin or library that may or may not expose an abstraction.

Continue reading

Prism.Forms EventAggregator

Using Prism.Forms EventAggregator with Xamarin.Forms

If you are building a Xamarin.Forms app, it should be a no-brainer that you use MVVM pattern for your code base. It should also be a no-brainer that you give Prism.Forms a try. It makes development fast and code easy to maintain with its plethora of built-in services such for navigation, dependency injection, alerts, events, etc.

I recently added a sample to Prism’s samples library on how to use cross-platform EventAggregator using Prism.Forms in a Xamarin.Forms app.

Continue reading

Handling Multiple Taps in Xamarin.Forms on Android

Sometimes in this beautiful world of cross-platform mobile development, we come across a problem that makes no sense at first. But after some StackOverflow surfing and Xamarin/MSDN research, we may find a way to tackle that problem. In some scenarios, there are multiple solutions and we have to decide which approach works best given our situation. In this post, I will demonstrate  one of these problems, rather scenarios. The multi-tap monstrosity on Android when using Xamarin.Forms.

Continue reading