Robert is a South African technology specialist with focus on Microsoft technologies. He is very passionate about teaching and sharing and is a Microsoft MVP & Ranger. Robert is a DZone MVB and is not an employee of DZone and has posted 57 posts at DZone. You can read more from them at their website. View Full User Profile

Trying Out Metro Style (WinRT) Using Windows 8 Beta

03.06.2012
| 2480 views |
  • submit to reddit

With the beta of Win8, VS 11 & .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, it is a list of the most common things (where most common is what I use, because I am pretty common Smile with tongue out)

Namespaces

Namespaces have been polished and there is a 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 & INotifyCollectionChanged is SOLVED!

I mentioned about the EPIC FAIL of the duplication of core interfaces – that has been solved! SmileSmileSmile

ObservableCollection<T> is broken is SOLVED!

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

User Controls must be created on the main thread is SOLVED!

I did not get a stupid behaviour where a user control had to be created on the main thread, and thankfully that has been solved! You can now create user controls on other threads! SmileSmile

IValueConverter has been changed

Previously the Convert & 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 compares, but means any IValueConverters from alpha will be broken and it is a simple change:

//Before broken
public object Convert(object value, string typeName, object parameter, string language)
 
//After changing type of second parameter = working
public object Convert(object value, Type typeName, object parameter, string language)

 Source: http://www.sadev.co.za/content/how-different-metro-style-winrt-development-really-beta-post-0

Published at DZone with permission of Robert Maclean, author and DZone MVB.

(Note: Opinions expressed in this article and its replies are the opinions of their respective authors and not those of DZone, Inc.)

Comments

Imdadyano Yano replied on Tue, 2012/03/13 - 7:06am

Hello,

Thanks for the blog. I really liked it while reading it. It is very easy and simple to understand. There are alots of good enhancements in the beta version as compared to alpha one. Its really great that you have aggregated all of them into single article. Nice one. Thanks once again keep it up.

Thanks

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.