8 quirks Windows 8 XAML developers should understand before starting their Metro app

It’s no secret, I love XAML. I write XAML, I talk about XAML, I dream in XAML. Sometimes that’s true – especially in the middle of a project. Sometimes people misconstrue that I don’t like HTML as a result, but as a father of three daughters, I can assure you picking favorites isn’t a requirement – even if I have a favorite. ;) But as a Metro developer, there are some things XAML developers should know that will save them serious time. I wish I had this list to start!

Look, this blog is not about complaining. There is no time for that. We need to get building. This is about saving XAML developers time by letting them know the deltas between their previous XAML development experience and what to expect in Metro. Metro XAML is new, right? Yeah – it’s still in beta as I write this. WPF is a decade old and SL is half that. They have a head start and Metro XAML is winding up. In the meantime, I let’s help each other save time.

PS: remember when Silverlight was only JavaScript? Things enhance! Meanwhile it is what it is. Don’t waste cycles complaining. Build with what you have!

  1. The binding Mode is not TwoWay by default. OneWay is, even for TextBoxes. That means Mode=TwoWay needs to become something you type by default. Otherwise, you might start thinking that simple binding does not work when it really works just fine.
  2. The ImageBrush’s TileMode is missing because TileBrush is missing. The RadialGradientBrush and VisualBrush are missing. You can burn hours looking for these (like I did). As a result, you will be using more images than you typically would in your designs.
  3. There is no ability to PriorityBinding or MultiBinding in Metro (this was also true in SL). Combine that with missing StringFormat and TargetNullValue, though, and you will be using more converters than you might otherwise. Leverage MVVM for formatting, too.
  4. Like Silverlight, Loaded is the only RoutedEvent supported in EventTriggers. The error when trying any other event is confusing. In the end, it means most of your animation will be handled through VisualStates more than animating the style.

Read the rest of the article at http://blog.jerrynixon.com/2012/07/8-quirks-windows-8-xaml-developers.html


Contributed by Jerry Nixon at http://blog.jerrynixon.com/2012/07/8-quirks-windows-8-xaml-developers.html

 

3 thoughts on “8 quirks Windows 8 XAML developers should understand before starting their Metro app

  1. WebView has no Focus method or support for tab navigation. As a result, it can get into some pretty weird states.

  2. Pingback: Dew Drop – July 26, 2012 (#1,372) | Alvin Ashcraft's Morning Dew

  3. Pingback: Windows 8 Contracts for Sharing Data « Jega's Blog

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s