1
2
3
4
5
6

Recreating Simple Windows Forms in WPF and XAML (Part 1)

So after two or three weeks of playing around with WPF/XAML I figured the best place to go next was to try and do some dialogs like I might do today in Windows Forms. I wrote these by hand using the Kaxaml tool mentioned on the recent Scott Hanselman podcast, and if you have that installed you should be able to make use of the .xaml files attached to this post pretty easily.

Keep in mind that this XAML is by hand (with Kaxaml's intellisense), not created via Blend or VS2008, and the XAML is probably atrocious to XAML experts - that's sort of the point. I'll be referring back to this project as I improve it - this post is just the initial post.

A simple dialog

(click 'read more' to read the full article..)

The main form of a MDI Application

Attached are the two different .xaml files, and the .zip file contains some icons referenced by the MDI application form - if you want the icons to show up you'll need to put them in the path referenced in the XAML (currently C:\SmartyPantsCoding\icons) - the hard coded path is an example of the stuff that will be improved upon as we go.

I've already got a few changes I know to make, I just wanted to get this up quick to serve as the baseline. Stay tuned for future updates.