The City that Doesn’t Sleep

I’m off to New York on a red-eye tonight, ’cause I’m getting dragged to the Harvard-Yale football game (“The Game”) this weekend. It should be fun. And I get to make fun of Kenny for being a snotty Ivy League kid, which is alwasy a good time.

While we’re out there, I’m going to check out Kleinfeld, which is the bridal store in New York. The place promises to be crazy — they required my credit card number to make an appointment, and they’ll charge $50 for a no-show. (!) I expect it to be amusing, but I’m also hoping not to find anything that I love too much there, as I’m having a hard enough time making a decision between the couple of gowns I’ve narrowed my search down to here in Seattle. ;)

Meet the Parents Part 3

Big weekend coming up: Kenny‘s mom/stepfather and dad/stepmother are flying in to LA to meet my parents. It should be very amusing. We fly down to LA tonight.

As a side note, someone convinced us to rent Meet the Parents in anticipation of this weekend. Which reminded me for the billionth time that I need to take movie recommendations with a huge freakin’ mountain of salt – what a bad movie!

What Happened to NavigationApplication?

I’m not sure how many of you at PDC have already installed “The Goods” CD that you received. When you do, and you start porting your WPF apps to this build, you’ll notice that the NavigationApplication class no longer exists. Don’t panic! All of the navigation features that you know and love are still around, and their usage model hasn’t changed much either. Before I go into too much detail on the change, here’s some background on the problems we had with the old Application/NavigationApplication split:

  1. The decision of Application vs. NavigationApplication has little to do with whether or not the app uses navigation – Applications may use NavigationWindows, and NavigationApplications may use regular Windows. So why make the choice? Since the decision of whether or not to use navigation really happens at the Window level, not the app level, we’d rather let developers make the decision per window.
  2. There was no way to create a markup-only application using the vanilla Application class.
  3. When using NavigationApplication and setting the StartupUri, there was no way to set properties on the MainWindow before it was shown.
  4. People were confused about when to use an Application vs. a NavigationApplication. This is in large part because there were only 3 main differences between the two: Startup behavior, the Properties collection, and Navigation events.

Given these known drawbacks, we set out to provide one Application class that solves the problems above and still meets all of your app-management needs. The main changes are as follows:

  • Moved StartupUri to Application – providing this property on the Application object maintains the existing startup behavior for NavigationApplications, and helps us enable the markup-only non-navigation Hello World scenario.
  • Changed how StartupUri works – if the XAML specified has a Window at the root, we’ll create the Window (no navigation occurs); if the file has a Page at the root, we’ll create the NavigationWindow implicitly and navigate to the Page.
    • Window –> create the Window (don’t navigate)
    • NavigationWindow –> create the NavigationWindow (don’t navigate)
    • Page –> create NavigationWindow and navigate
  • Moved Navigation events and Properties collection to Application

In general, most people have found the change relatively easy to adapt to, and they are appreciative of this simplification of the API. The most common migration path will simply be replacing your <NavigationApplication> tags with <Application> tags — and then everything should just work as it did before. If it turns out to be more difficult for you, or you have any questions about how to migrate, please let me know.

Logistical Details for My PDC Session

I posted the abstract for my talk about a month ago, but now we actually have all the logistical information available too:

PRS314 – Windows Presentation Foundation (“Avalon”): Using Application Services
September 14, 5:00 PM – 6:15 PM
150/151 (Hall E)
Lauren Lavoie

Learn how to use Windows Presentation Foundation (formerly codename “Avalon”) application-level services for data management, system interaction, hosting, and UI to create great client applications. See how to create both standalone client applications and rich browser applications that can take advantage of these services. Gain guidance for using application-level services, such as when your application should be hosted in the browser or a standalone window, whether or not to write a navigation-based application, and how to manage application data and settings for various scenarios.

I hope to see you there next Wednesday!