Pro Tip: Useful Code Snippets For Your Xamarin.Forms Development

Code snippets are a hidden gem in Visual Studio that most of us do not pay much attention to. Utilizing them correctly can increase productivity when we have a lot to code. In Visual Studio, code snippets are available for multiple programming languages e.g. C#, F#, XML, HTML, CSS, Python, etc. They are extremely useful when we have a bunch of boiler plate code for our properties, constructors, bindable properties, etc.

Code snippets can be a huge topic, but in this post, I will list some of the XAML and C# code snippets useful when developing Xamarin.Forms mobile applications.

In this post,

  • Snippets
  • Creating Code Snippets
  • C# Examples
  • XAML Examples
  • Export Templates

Continue reading

Advertisements

Card View For Xamarin.Forms Using Custom Layouts

In this post, we will learn how to create a card view with child views using custom layouts. Creating a custom card unifies the experience for the user, gives us more control on the design of the app and speeds up the cross-platform UI/UX workflows. It is easy to get a simple, yet flexible, card introduced in your app.

Continue reading

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

Tutorial: BottomNavigationView and ViewPager in Xamarin.Android

Android introduced BottomNavigationView in API 25.1 and I like it. To be honest, one of the biggest difference between iOS and Android for me was the placement of tabs. I enjoyed ActionBar tabs when they were a thing and loved the fact that I could swipe the tabs as I wished. But, when I used the bottom tabs in Android recently, I fell in love instantly. In today’s world of giant smartphones, one can only reach the bottom of the device during one-handed operations, so I loved the fact that I could use my hardware back button to navigate back and switch between tabs all with a single thumb.

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

Xamarin University

Get Xamarin Certified Now. For less.

The most deterrent factor for anyone trying to get Xamarin certifiedhas been the upfront cost of enrolling in to Xamarin University. It used to be $1995/developer per year paid annually, which went down to $999 late 2016. This was a whopping 50% discount which garnered interest of many potential certification candidates. But let’s be honest, a grand is still very much out of question for a young developer who might still be in college or an experienced developer who just can’t afford that upfront, specially when some of other technical certification such as Microsoft’s are much cheaper.

Continue reading