MAUI finally had its day in the limelight at .NET Conf with a dedicated “focused” event. There was a lot of good content shared in a roughly 8 hours long live stream. In addition to live stream, there are recorded sessions that are also available at .NET YouTube channel. Here are some of the highlights from the event that I am excited about.Continue reading
How To Support Dark Mode In Xamarin.Forms (iOS & Android)
iOS 13 introduced dark mode, and it has taken mobile app design world by storm. Making app designers produce multiple experiences for their users. Android users have been enjoying this nifty feature for some time (to some extent, based on phone manufacturers). Android Q, however, has a dedicated dark mode option that brings dark mode front and center in Android as well. Fortunately, it is rather simple to add dark mode support to our Xamarin apps, as we will discover in this post. Or simply opt-out of it all together.Continue reading
Checkbox For Xamarin.Forms
Xamarin.Forms is great. But, every now and then, it falls short on some basic modern controls e.g checkbox, radio buttons, cards, etc. Luckily, Xamarin community is large and very engaged with the platform. You can find plethora of custom controls or blogs on how to build custom controls for your project needs.
In recent years, I have created a bunch of custom controls that I am sure the community at large can benefit from. One such controls is a simple Checkbox. There are lots of implementations of checkbox available, but I wanted something simple and light, so I created one. Here’s how the checkbox works…
Instant Duas Now On All Major Stores
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,
- Creating Code Snippets
- C# Examples
- XAML Examples
- Export Templates
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.
Update: Get this card as part of IntelliAbb Xamarin Controls NuGet package.
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.
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.
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.
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.