Styling Xamarin.Forms with CSS

The latest Xamarin.Forms nightly build includes support for CSS. For a comprehensive list of what is presently supported, check Stephane’s pull request. With a little downtime this holiday season, I was excited to put it into practice and get my head around it.

Before I dive in, it’s important context to understand that the Xamarin.Forms CSS parser is a mapping to the existing styling that we already use in XAML or C#. At its most basic, it’s just another way to express styling. As it matures, I think we’ll find it to be uniquely flexible.

First Impression

  • My XAML just went on a diet. By pulling my style-able properties into CSS files, the XAML got a lot thinner and legible.

  • XAML is still more powerful. You cannot style everything in CSS that you can in XAML. A prime example is the NavigationBar

  • With the notable exception of the caret prefix, it is valid CSS. That means I can share CSS from and to web projects and my 20+ years of CSS experience is mostly applicable.

First App - Basic CSS

I broke my garage door opener in early December, and I broke it really well. Pieces flew everywhere. It was glorious.

» continue reading
Categories: XamarinPermalink

Xamarin.Forms Tips and Tricks Webinar

I had a great time pulling together Xamarin.Forms content and presenting a webinar yesterday. It came in at a little over an hour, and I think you’ll find it’s chock full of good tips.

The Xamarin.Forms engineering team has been focusing on stability and performance. We’ve tried to really prioritize those tasks above others, and we’re starting to reap the fruits of that labor.

As I talk to customers and interact with developers I’ve realized I don’t highlight enough about some of the great features available NOW in Xamarin.Forms that allow us to achieve better performance and deeper control of the app experience. Sometimes we need a refresher on all the great things we can do.

In this presentation I covered:

  • XAML
  • XAML Compiled (yes faster. much faster)
  • AOT
  • Xamarin.Forms Renderer architecture
  • Platform Specifics
  • Platform Effects
  • Custom Renderers
  • Animations
  • Deep Linking
  • Layout cycle and optimizing for performance
  • ListView performance

Originally I planned to live code it all, but when I practiced this on the first couple of demos it quickly became clear the presentation would take an eternity and a day. I mean, if you want to see me type…nah, nobody does. But if you want to learn some cool stuff, check out the video, grab the slides, clone the demos and kick it around.

Video on Channel 9

Slide Deck

» continue reading
Categories: GeneralXamarinPermalink

Generations and Careers

My grandfather Nicolas worked his entire career for Anheuser-Busch. He entered the company in a quality assurance role: a taster. Yes, a taster. At some point he put his accounting training to work and for the majority of his time there was responsible for purchasing the barley and hops and probably much more. He was quite proud of participating in the design panels for different beers and policies including born-on-dating. As I see it so clearly now, he was obsessed with quality.

My father Mark has tried on numerous occasions to retire from dentistry, but never seems to succeed at quitting. He still sees a few patients, mostly family, and serves as a volunteer leader in dental clinics both in the downtown St. Louis area and abroad in Kosovo where he has done so much good. Of the things that made an impression on me at a young age, I recall at the dinner table he would never talk freely about his clients. He respected their privacy. But he would get upset when things didn’t go quite right; a broken crown or a patient that was experiencing pain long after they should have. Strangers have often told me how much they respected his care for them, his attention to detail, and his standard for quality. He got that from his father.

I’d like to think I too am influenced by them to …

» continue reading
Categories: GeneralPermalink