Pages

Friday, 7 September 2012

Code Contracts tab in VS2012 – Odd way to get it enabled


Code Contracts tab in VS2012 – Odd way to get it enabled
I am a huge fan of the Code Contracts library which is now part of .net, in fact when I setup a new instance of VS it is one of the first plugins I install by default.  However, I was having some issues because even though I had installed the .msi I was not able to get the settings tab to show up in VS2012, in fact it was not in VS2010 either.  This was a bit odd to me because I had never had this issue.

In order to try to resolve this I decided I should uninstall the .msi and re-install it, so I set out to do this.  However, after doing this I still did not have the tab in either IDE, now I was perplexed.  Of course the first thing I did was to go out and search for the solution for this issue but nothing really popped out as ‘this is how to fix this issue’, however a few people did mention that they had to do a VS Repair install.  I thought this to be a bit extreme so I was not too keen to give this a try.

Read More

Embracing UI on demand with the app bar

Embracing UI on demand with the app bar
Creating a great app requires honing in on what makes your app best in its category and making that shine. Windows 8 provides tools like charms and app bars to make it easy to really focus on what makes your app best in class and minimize anything that distracts from it. Learn to use those tools and your app and your users will be able to really enjoy what makes your app great.

Read More

Enforcing square proportions in XAML


Enforcing square proportions in XAML In my current Windows 8 project, I needed an object on the screen to resize with screen size – and keep it’s proportions. Turned out to be a bit trickier than I thought…

What I wanted was this:

I had to have it as Stretch alignment to scale with the screen size, so fixed Width/Height was out of the question. The starting point was to have VerticalAlignment=Stretch to always use a third of the screen height, but what about the Width?

Read More

Styling a GridViewItem in WinRT


Styling a GridViewItem in WinRT

Proving to be the bane of many a burgeoning Windows 8 developer is how buried and convoluted the GridViewItem template turns out to be. Combine a hard to get to template with brushes that derive from ListViewItem rather than GridViewItem and referenced outside of any visible dictionary and you’ve got a day long (at least) treasure hunt on your hands.

In this post, I’ll provide the Style for a GridViewItem, the necessary brushes (with comments), and a sample implementation.

Read More
Web Informer Button