WPF Grid: ‘Auto’ vs ‘*’

For some reason every time I use a Grid control in WPF, I get these two settings mixed up.  The difference is subtle but simple, and it has a huge impact on how your content is displayed.  The important thing to remember is that ‘Auto’ will size the row or column based on its content, […]

Opening a StorageFile as System.IO.Stream

This one is easy, but a bit tricky if you are just looking it up online.  When working with a Universal App in Windows, you generally use the new Windows.Storage.StorageFile class.  This works great, except when you need to get a System.IO.Stream instance.  If you do a quick google search, the simple way is to […]

ASP.NET MVC, Permanent Redirects and HTTP 301 Moved Permanently

This one stumped me for an embarrassingly long time.  I have several pages that I am in the process of moving permanently to a new domain.  The site is written using ASP.NET MVC and I wanted my controller to return a 301 Moved Permanently status (along with the location header) if the page in question […]

Save and Load Selected Items in a WP8 ListView

I’ve been working on the fit and polish of my new WP8 app and wanted to preserve the selected items of a ListView across page navigations.  This allows the user to navigate to a new page to perform some action and return to the same state they left. The first step to preserving and restoring […]