3

I'm hoping someone here can explain to me the difference between WPF and XAML exactly in this context:

I have an application (an XBAP specifically) written in VB.NET using MVVM & Repository Pattern, implementing the the usual INotifyPropertyChanged, OLEDB etc etc.

The front end of the application is written in XAML.

From what I understand there is nothing specifically "WPF" about this application. In my view its XAML + VB.NET; where does the WPF come in? Given windows 8 and the "death of Silverlight/WPF" that I keep hearing about, what should I be doing to "upgrade" my application to ensure its future?

I would greatly appreciate someone clearing up this confusion for me.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
Omar Mir
  • 1,500
  • 1
  • 19
  • 39

4 Answers4

8

XAML + your code behind is WPF. You are using WPF. XAML is the markup used for defining the interface in WPF.

And I wouldn't worry too much at this point about "the death of Silverlight/WPF". Just because Windows 8 supports HTML5/JavaScript doesn't mean WPF has gone away. At least, not yet.

See also.

Matt Burland
  • 44,552
  • 18
  • 99
  • 171
  • I don't quite understand - most of my Code Behind, i.e. the models and the viewmodels seem like just standard vb.net code that I could've used in WinForms - I would hazard 95% of my code came from WinForms when we upgraded the UI. The entire Database Access Layer, models and vast majority of the common functions. We added the ViewModels and a few other small things to run under "WPF" – Omar Mir Oct 26 '12 at 20:04
  • @OmarMir: You are using the WPF libraries, ergo, you are using WPF. You don't write an app "in WPF" and more than you write an app "in LINQ" or "in ADO.NET". It's just set of functionality you use. That you didn't need to change a whole lot coming from winforms is a good thing. Suggests you did a good job of separating the models from the view. – Matt Burland Oct 26 '12 at 20:10
3

An XBAP (XAML Browser Application) is a kind of WPF XAML application, that runs in the browser. Nothing more, nothing less.

WPF isn't going away anytime soon; in fact, it received a number of enhancements in .NET 4.5. Windows 8 will continue supporting WPF whether it's run on the desktop or as an XBAP. There's no need to "upgrade" your app, but if you want to take advantage of the Windows Store and the new user interface, it's not difficult to port your WPF XAML to WinRT XAML.

BoltClock
  • 700,868
  • 160
  • 1,392
  • 1,356
  • I've tested my app in Windows 8 and yep, it runs but what happens in Windows 9 and then 10? WinRT XAML is fine for whatever its used for but how does one write Windows Desktop apps going forward or is the intention to stop doing that? – Omar Mir Oct 26 '12 at 20:05
  • From what I've heard, desktop apps are going to be around for a while (especially owing to enterprises). There's no way Windows could realistically go all Metro and no desktop in the near future. I suggest you don't worry about it. – BoltClock Oct 26 '12 at 20:14
2

See, WPF can be called as the Successor of WinForms . In WPF WE have this XAML that is simply XML but Is more powerful and has greater properties . WPF isn't dead ! Talking about Windows Store Apps, Silverlight has lots to do with WPF and XAML

1

Your XBAP application uses WPF : XAML for the UI and VB.NET for the code behind. If you want to be sure, check if the namespaces you use in the code begin with "System.Windows".

Your XBAP is just a kind of project you can create with the WPF technology. (that's an application which shows several web pages as its UI).

Lightness Races in Orbit
  • 378,754
  • 76
  • 643
  • 1,055
Stephane Halimi
  • 408
  • 3
  • 5