As I have mentioned before, there is no native CheckBox in Xamarin Forms. You may say, “But I’m in desperate need of it! How will my check-list app look like if I will use Switch instead of CheckBox!?” No problem. Let’s use my tricky-hacky-font-awesome-sh solution.
First of all, you need to integrate Font Awesome font into your Xamarin Forms app. Prepare Custom Renderers that will be responsible for using Font Awesome font, instead of native. You can use below tutorials for that:
Once you have finished, you can use newly prepared FontAwesomeLabel in XAML:
- Define XAML static values such as:
- Define CheckBox FontAwesomeLabel view and “switching logic” at XAML:
- Define CheckBox logic at ViewModel:
LET’S RUN IT!
You can click (tap) the first CheckBox, and it’s just simply switching from checked to unchecked (once you tap it).
The second one is disabled, and that’s why it’s unchecked and in grey (if it were checked, but also disabled, it would be Particularly in grey). It won’t switch to checked if tapped.
It looks the same on both platforms, and so is Font Awesome.
Full code for FontAwesomeLabel and how-to manual for CheckBox purposes is available here.
Conclusion – what to use?
- There is no one simple answer. You need to try as many times as possible to find components, which fits your or your customer’s needs.
- Telerik is mature enough, and it’s a recognisable brand. Especially for .NET developers.
- Syncfusion has more UI components that could be useful for nice-looking modern mobile apps.
- I found some issues at Telerik ListView implementation, which don’t occur at Syncfusion ListView. Furthermore, I have also found some rendering issues at Syncfusion components, mostly on iOS, i.e. SfRotator thumbnails don’t render correctly (only first thumbnail was available).
- Both Telerik and Syncfusion (even more, all three of them including Xamarin Forms) have some issues/rendering problems. Custom components could have even more bugs inside, because of the usage of native components with additional code. And if the native component contains bugs, then issues are unavoidable.
- Syncfusion has another benefit in comparison with Telerik – it has free Community License, if you are “individual developer” or if your company has “annual gross revenue below $1 million USD.” In the second case, up to five users can use Community License.