I have an application that uses the WPF frame for navigation.  The frame markup looks like this:

This Frame tag is located in my ShellView.xaml file and this takes the place of a ContentPlaceholder.  In order to navigate to another page I simply call ActivateItem( viewModelInstance ) from my ShellViewModel.  Because the ShellViewModel orchestrates the page loads I created a simple ChangeViewMessage class to throw via the EventAggregator.  My ShellViewModel handles this message and passes the viewModel instance to the ActivateItem method.  Caliburn Micro takes care of everything else.

Here is an example of the ShellViewModel loading my initial page/view in the constructor.

You can see that my first view (SelectServersView via the ViewModel) is loaded there.

In order to make Caliburn Micro work you have to patch one method to be ‘Frame Aware’.

In the View.cs class of the Caliburn Micro source in the Caliburn.Micro.WPF project change the SetContentPropertyCore method to look like the one below.  This allows you to use a Frame.

 

 

 

While building a small application for viewing passwords (basically pwsafe for Windows Phone 8) I realized that because of the restrictions of WP8 with regard to the file system I needed a way to pull password files from a remote storage.  As it turns out, the SkyDrive API is comprehensive but did not have a concise Windows Phone 8 API so I started building one.

https://github.com/dsandor/SkydriveHelper

The code is very basic at this point but I do intend on improving it.

With the API helper you can:

These commands will allow you to do the majority of what you need (except upload).

To use it, simply place a SignInButton found in the Microsoft.Live.Controls assembly for Windows Phone 8.  On the OnSessionChanged event simply pass the Session to the helper and it is ready to go.

There is a very simple sample application included in the source tree that will let you get the directories from the skydrive and download a file.

This is a pretty rookie mistake with .NET 4.5 and the new async / await operators.  While searching for the answer I found a lot of noise and no valuable answers so I thought I would notate the solution on my blog.

The short answer is that any method that uses await must itself be marked with async.

Take this code for example:

Error    2    The ‘await’ operator can only be used within an async method. Consider marking this method with the ‘async’ modifier and changing its return type to ‘Task’. 

Dear Visual Studio 2012 developer that put in the registry entry to remove the ALL CAPS metro menu item ‘feature’.  I owe you a frosty cold beer.

[image%255B6%255D.png]

Here is the fictional transcript of the SCRUM meeting at the Visual Studio team:

Program Manager: Guys, marketing wants the IDE to represent the metro look and feel.

Developers: OMG are you kidding?  The development community is going to roast us for having the UI yell at them all day.

Program Manager: Well we need to eat our own dog food.

Developers: Fine, if we have to. (Thinks to himself: I am making this configurable.  I just know this is not going to fly in the real world.)

Hence: http://www.richard-banks.org/2012/06/how-to-prevent-visual-studio-2012-all.html

My first impression so far has been "Oh my Metro".  I am not sure if I like it yet.

image

The menus are in all CAPS.  WHY IS THE IDE YELLING AT ME?

image

The color scheme is a bit washed out.  I am still trying to get used to this but it does telegraph to the code and designer as they are where your eyes go.  I could get in to this high contrast look if it were to splash color at the portion of the UI I were currently using.

WPF Control / Element selection works well and very fast.

image

The UI is very responsive.  If you remember Visual Studio 2008 (Ugh I still have to work in VS2008) clicking on a UI element in the designer renders properties in about a minute if you are lucky (and have ReSharper disabled).  Visual Studio 2012’s new IDE is very responsive.  Thank you!

image

Visual Studio 2012 adds List as an option for your DataSources if you are a drag and drop binding kinda guy.

image

The XAML Designer has some Blend functionality built right in now.  From the left: Zoom Level, Toggle Effects, Show Snap Grid,  Snap to Grid Lines, Snap to Snaplines, Show Annotations.

Toggle Effects

This allows you to turn off the special effects bound to controls.  This helps speed up the designer a great deal.

Annotations

Allows you to view annotations about your WPF application (presumably from a sketchflow annotation).

image

The Solution Explorer looks Metrofied and adds a really useful Collapse All command and a Pending Changes filter command.