Windows/Phone 8.1, Prism Universal Early Drop, Migrating a Demo to be Universal

Combining a couple of blog posts, I thought I’d take the demo that I showed in the video on this post;

Windows 8.1 Apps- Updated Prism for Windows Runtime Session

and apply the pre-release bits that were in this post;

Phone 8.1- Prism for the Windows Runtime (Universal)

and see how I can put together that 2-page “Contacts” app;


in a Universal way. To make life easier for myself, I put this into a few different video segments.

Part 1 – Getting a Blank, Shared Project Up And Running

With that in place, I can start to run through putting my demo back together from the point of view of building out the Windows app while trying to make as many things shared as is possible. Given that I’ve recorded that video before, I’m not going to go through it blow-by-blow but, instead, I’m going to break it down into implementing the initial page and then the secondary page and I’ll pull out the bits and pieces that are interesting/blockers along the way.

Part 2- First Page Up and Running

Part 3 – Details Page Up and Running

The second page in that “Contacts App” has a little more complexity than the first one in that in the demo I build it up to allow for suspend/terminate and I add some validation and I add a confirmation dialog and then some portrait/landscape kind of functionality.

None of that is overly complex, it’s just more than happens on the first page.

Part 4 – Tailoring for Windows/Phone

The last part for this particular piece of demo code is to try and fix that Phone UI because it’s simply sharing the Windows UI with its generous margins and so on and that really isn’t going to work. I ended up taking the approach of making a Windows/Phone specific “Frame” for each page and then embedding a common user control into the middle of that. Here’s the breakdown;

and, for the moment, that’s where I got to in taking that previous Prism demo code and making it “Universal”. The main learning for me in that was around the missing validation functionality – that needs some thought on my part.

The code (quite sketchy) as of the time of writing is here.