Intro to Styling

We've worked hard for you to be able to leverage your knowledge of CSS to theme mobile applications. Applying these classes will allow you to build beautiful mobile apps with consistent styling.

CSS Styling in Xamarin.Forms

CSS styling is a powerful way to style your applications. It's also a simple way to bring consistency to your project. Unfortunately, there are a few limitations you should be aware of.

  • XAML styling is the first class citizen in Xamarin.Forms

  • CSS plays a side role in providing a familiar approach to styling XAML elements

  • One cannot do everything in CSS that is doable in XAML styling

Topics

  • StyleClass

  • Pixel Units

Downhill Framework

We've given our mobile CSS framework the name Downhill (it's much easier to roll a rock downhill you know).

Tips

Below are some tips and tricks to using CSS in your application:

  1. CSS properties in Xamarin Forms are very picky. If you spell or mis-type a property wrong your application could fail to load. Be care, and test well.