Windows Presentation Foundation Navigation - a quick overview

We are running a 2 day WinFX lab for our ISV early adopters - and the area I agreed to become a SME in (subject matter expert) was WPF Navigation. Well - I am no SME (yet) but it proved to be an interesting exercise.

WPF navigation turned out to be quite fascinating and rather powerful. We have placed a lot of effort into three areas:

  • Bring Web Style Navigation to smart client applications (FWD, BACK, Frames etc)
  • Making it easy to build Inductive User Interfaces
  • Giving a great GOSUB in a world filled with GOTO :)

Web Style Navigation
We introduce a new window type, NavigationWindow, which comes with a Journal that tracks your navigation through a number of Pages, another new UI type. NavigationWindow displays Back/Fwd buttons (with history context menus) and "just works". Very nice. We add to this Frame which allows part of a NavigationWindow (or indeed a normal Window) to navigate independently as we are used to with HTML. Frame navigations by default are merged with the NavigationWindow Journal containing the Frame - but a Frame can also have its own Journal (think IE7 Tabbed Windows as a potential use). There is plenty more to this - and I will blog later - but for now, just think "cor... that makes it drop dead easy to add web style navigation to my SDI app".

Inductive User Interfaces (IUI)
Microsoft Money 2000 was (to my knowledge) our first application to offer an Inductive User Interface - leading the user through a series of steps or tasks, rather than presenting many buttons and menus. Wizards would be another example. Windows Vista is full of IUI and therefore it is no suprise that WPF and Windows Vista together combine to make building these sorts of solutions easier. One of the WPF technologies is PageFunctions.

GOSUB (aka PageFunction)
Hopefully you all remember the BASIC language GOTO statement? No - well - web developers are living in a world of GOTO right now - an unpleasant and unsatisfactory world. When a web app navigates from page 1 to page 2 it actually does a GOTO page 2. If page 2 now needs to return to page 1 it .... actually does a GOTO page 1. Yet often the scenario is very analogous with calling a subroutine - GOSUB in other words. GOSUB is nice, but we created Functions many years back as an even better version of GOSUB - the Function takes in arguments to match its parameter list and returns a value.

What has this got to do with WPF? Well - WPF gives us Pages which can be called as if they were functions. The page gets given some arguments (on its contructor), displays and returns back a value. Sweet. To do this you simply need to create a page of type PageFunction.

Some useful links to take a look at:

More soon...