tags:

views:

40

answers:

1

Why is there a difference in the way the Application object is created in WinForms and WPF?

-> In WinForms we never created the Application object. It was always available (I believe it was Singleton pattern). In WPF, although hidden in App.g.cs we need to instantiate one.

-> In WinForms it was a sealed class, but in WPF the way to go is to inherit it.

Is this done:

  • to be able to define the application in Xaml (App.xaml)
  • due to introduction xbap/navigation projects?

What benefits does it really provide?

A: 

I don't know that the design decision is entirely motivated by the desire to be able to define the Application object in XAML. But that's reason enough, it seems to me.

Robert Rossney