WPF Templates Very Neat Example

by Law Metzler 26. September 2009 16:31

We've been developing a couple of applications using the WPF (Windows Presentation Framework) and I've been spending a good amount of time reviewing it.  And I have to say, it really is hand over fist a very great framework to work with.

While we had developed a few Silverlight controls and apps using it in the last few years, I've personally haven't had the time to really get knee deep into the details of it until now, and boy what I have been missing.  From a coding standpoint, it's still just C# (or VB if you're so inclined); but from an designing point of view, it offers a wealth of features and enhancements.

In essence, WPF allows the separation of visual design and actual programming much in the same way as Asp.Net does so with code behind.  While programming for Windows Forms had the resemblance of the separation of the two (at least if you were using Visual Studio or another editor), it really was not separated at all, as the whole layout and stying was done inside the class's "Initialize" method.

With WPF, all the design is done inside the XAML file, which is simply an XML file.  And with tools like Microsoft's Expression, designer's and developers can work hand in hand with the tools designed for them.  (Let's face it, Visual Studio leaves a lot to be desired when in the hands of a graphic artist)

But while WPF separates code and design like ASP.NET, it extends the capabilities of the XAML in ways that ASP.NET could never even dream of.  Submitted for your approval, see this implementation of the standard listbox.

Tags: , ,

Comments

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading



Powered by BlogEngine.NET 1.5.0.7
Theme by Mads Kristensen