How different is Metro Style (WinRT) development really? The beta post

goodwork

Note: Before you read this post, it is using the public consumer preview (beta) of Windows 8, Visual Studio 11, and .NET 4.5, so I expect some issues will likely be resolved in later releases.

With the beta of Win8, Visual Studio 11, and .NET 4.5 now out, I thought I should post again (first post about this can be found here – recommended reading to see how it has improved) how it has improved or changed since the alpha. This is not meant to be an exhaustive list, but rather a list of the most common things (where "most common" is what I use, because I am pretty common 😜).

Namespaces

Namespaces have been polished, and there is much better alignment of the new awesomeness to the old—so this is getting much better.

#if NETFX_CORE
    using Windows.UI.Xaml.Controls;
    using Windows.UI.Xaml;
    using Windows.UI.Core;
    using Windows.UI.Xaml.Controls.Primitives;
#else
    using System.Windows.Controls;
    using System.Windows.Controls.Primitives;
#endif

Duplication of INotifyPropertyChanged, ICommand, and INotifyCollectionChanged is SOLVED!

I mentioned the EPIC FAIL of the duplication of core interfaces—that has been fixed! 😊 😊 😊

ObservableCollection<T> is broken SOLVED!

The double facepalm that was breaking ObservableCollection<T> has also been fixed—so this means your Metro-style apps are more like your WPF and Silverlight apps than ever before.

User Controls must be created on the main thread SOLVED!

I no longer get the stupid behavior where a user control had to be created on the main thread, and thankfully, that has been fixed! You can now create user controls on other threads! 😊 😊

IValueConverter has been changed

Previously, the Convert and ConvertBack methods' second parameter was a string; now, it has been changed to a Type. This is a good move as it allows for better comparisons, but it means any IValueConverters from the alpha will be broken—though it's an easy fix:ui

// Before (broken)
public object Convert(object value, string typeName, object parameter, string language)

// After (working)
public object Convert(object value, Type typeName, object parameter, string language)