Batista R. Harahap

Gotchas Upgrading C# Projects to Visual Studio 2012

My previous post is about my experience developing for Windows 8 RTM using Visual Studio 2012, there were BREAKING changes with Visual Studio 2012 and I feel obliged to map my own efforts for the benefit of other developers. So I'm going straight to the topic. Most of the content is NOT from my own experience, I put them down here to compile the gotchas.

Everything you see here is actually available as a whitepaper published by Microsoft here.

From Shai Raiten's excellent guide here, find and replace all namespaces found below to the value on its right:

Type Old Value New Value Comment
Class PointerEventArgs PointerRoutedEventArgs
Style FocusVisualBlackStrokeBrush FocusVisualBlackStrokeThemeBrush
Style FocusVisualWhiteStrokeBrush FocusVisualWhiteStrokeThemeBrush
Style ApplicationHoverTextBrush ApplicationPointerOverForegroundThemeBrush
Style ApplicationPressedTextBrush ApplicationPressedForegroundThemeBrush
Style ControlDisabledTextBrush ButtonDisabledForegroundThemeBrush
Style ApplicationSecondaryTextBrush ApplicationSecondaryForegroundThemeBrush
Style AppBarItemForegroundBrush AppBarItemForegroundThemeBrush
Style AppBarItemBackgroundBrush AppBarItemBackgroundThemeBrush
Style AppBarItemHoverBackgroundBrush AppBarItemPointerOverBackgroundThemeBrush
Style AppBarItemHoverForegroundBrush AppBarItemPointerOverForegroundThemeBrush
Style AppBarItemForegroundBrush AppBarItemForegroundThemeBrush
Style AppBarItemPressedForegroundBrush AppBarItemPressedForegroundThemeBrush
Style AppBarItemDisabledForegroundBrush AppBarItemDisabledForegroundThemeBrush
Style BackButtonBackgroundBrush BackButtonBackgroundThemeBrush
Style BackButtonGlyphBrush BackButtonForegroundThemeBrush
Style BackButtonPressedGlyphBrush BackButtonPressedForegroundThemeBrush
Style BackButtonHoverBackgroundBrush BackButtonPointerOverBackgroundThemeBrush
Style BackButtonHoverGlyphBrush BackButtonPointerOverForegroundThemeBrush
Style BackButtonGlyphBrush BackButtonForegroundThemeBrush
Style ListViewItemPlaceholderRectBrush ListViewItemPlaceholderBackgroundThemeBrush
Style ListViewItemOverlayBackgroundBrush ListViewItemOverlayBackgroundThemeBrush
Style ListViewItemOverlayTextBrush ListViewItemOverlayForegroundThemeBrush
Style ListViewItemOverlaySecondaryTextBrush ListViewItemOverlaySecondaryForegroundThemeBrush
Method this.Dispatcher.InvokeAsync( this.Dispatcher.RunAsync

My own additions:

Type Old Value New Value
XAML VerticalScrollMode="Rails" IsVerticalRailEnabled="True"

If you also wanna help with your experience, please leave a comment and I will update the list accordingly.

09 October 2012 by Batista Harahap on c | gotchas | metro | microsoft | rtm | windows 8 | xaml
comments powered by Disqus