Devlico.Us
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @devlicious

Derik Whittaker

Thoughts on Software Development, .Net, OOP, Design Patterns and all things cool



WPF, What am I missing...Am I slow?

Like a ton of other developers out there I went out this week and downloaded all the new .Net 3.0 stuff so i could play around and educate my self.  Well, educate myself I did.

Now, let me just say that I have been a dedicated WinForms developer for the past 3-4 years so I would consider myself pretty much an expert in all things WinForms.  So when I fired up my newly updated IDE and created a new project to play with WPF I got pretty disappointed pretty quick.

The first thing I did with my newly created project was put a button on the form and attempt (keyword here) to attach the button click event to the button (message box an hello world message).  W.T.F. in ALL prior versions of .net, you drop a button on the form, double click on the button and poof, you now have a newly created button click event.  NOT with WPF, no, you have to figure out HOW to add the button click event.  Ok, so being the googler I am, I set out on a quick search to find an example on how to wire up a button click event.  The first example I found that actually talked about this had me add a few lines of code to the XAML.... Again, W.T.F.  adding code to the XAML is no way to write code, there has to be a way to create the method in the Code Behind form.  Sure enough, after more searching I confirmed that you indeed can add code to the code behind.  The problem is that my IDE kept trying to tell me that the method was invalid, but when I would compile the project it worked just fine.

My next beef is the XAML.  What purpose does this serve in the grand scheme of things?  What was wrong with the 'old' style of layout and component initialization?  The only solid reason I can see for XAML is so that some day in the far, far distant future, M.S. makes it so that a WinForm app can run like a browser app and vis versa...  Is this the intent???  Please help me understand.  And if this is the intent, why????  Most business apps I have worked on have never needed to be 'multi-plateform' applications.

My last beef is with the number of out of the box UI controls.  Either my tool box is missing UI controls or M.S. decided that there werecertain controls not worth their time developing (if memory serves correctly, they did this same thing with .net 1.0).  Where is my calendar control, my list view control, my link label, my up/down control? 

My conclusion is this, unless I get a pretty compelling reason to continue to play with WPF over the next 6-12 months, I for one am not going to look at this again.....

If I am missing the big picture about WPF, please explain.

BTW, the skinning feature of XAML and WPF is cool, but I don't have much need for that stuff in the type of development I do on a day to day basis.



Comments

Ryan Emerle said:

I'm right there with you, however, the IDE integration is only a CTP.

I'm assuming we can expect a much better workflow once Orcas is released.  I'm, personally, going to hold off on further investigation until then.

# November 10, 2006 8:15 AM

Artur Herczeg said:

I spend a lot of time showing students the nice features of WPF. When it comes to talk about the porpuse of WPF, we reference to XAML as an intermediate language between developers and designers. Both of them know XML so it's easy to learn and understand XAML. Designers design something in their tool (e.g. Microsoft Interactive Designer) and generate a beautiful and very usable UIs. Next the developer opens up the XAML, adds the business logic and that's all. Designers do the design part, developers do the coding part.

Have fun and try out 3D designers (like ZAM3D) as well. ;)

The missing default event handler (double click) is really an annoying thing.

# November 10, 2006 10:20 AM

Rob Eisenberg said:

Derik,

Excellent questions.  I will post my answer soon, as it will take more space than is appropriate here.  I hope I can convince you not to give up on WPF!

# November 10, 2006 1:41 PM

Peter Gomis said:

Derik,

Your WTFs with WPF are completely justified because unfortunately the IDE integrations are just not there yet.  This is all new to everyone, but your comment about Windows apps running like browsers apps is somewhat true.  That's the talk at the industry conferences and whitepapers.  The IDE integrations that are out now are basically little more than XAML designers.  I'm sure later editions of Orcas will have more.  In the meantime, we'll just have to muddle through for the time being.

- PG

# November 27, 2006 1:32 PM

quipa said:

Good web page! <a href=" http://swissreplicawatch.iphorum.com ">swiss replica watch</a>

[url=http://swissreplicawatch.iphorum.com]swiss replica watch[/url]

# April 17, 2007 4:51 PM

Vkusnaya said:

Best web resourses! <a href=" http://coachreplica.iphorum.com ">coach replica</a>

[url=http://coachreplica.iphorum.com]coach replica[/url]

# April 17, 2007 4:52 PM

Jennifer said:

Good web site! <a href=" http://rolexreplica.iphorum.com ">rolex replica</a>

[url=http://rolexreplica.iphorum.com]rolex replica[/url]

# April 17, 2007 4:55 PM

Gmael said:

Best site! <a href=" http://replicapurse.iphorum.com ">replica purse</a>

[url=http://replicapurse.iphorum.com]replica purs[/url]

# April 17, 2007 5:33 PM

GogVan said:

I like this disign! <a href=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=758 ">discount phentermine</a>

# April 18, 2007 3:18 PM

Besgirl said:

Best pharmacy! <a href=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=761 ">phentermine no prescription</a>

# April 18, 2007 3:31 PM

VanGog said:

The best web site! <a href=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=759 ">phentermine</a>

# April 18, 2007 3:37 PM

Pitter said:

Pharmacy for you! <a href=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=760 ">phentermine 37 5mg</a>

# April 18, 2007 3:38 PM

Molodec said:

I love this site! <a href=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=757 ">cheap phentermine</a>

# April 18, 2007 3:43 PM

Regina said:

Best resourses! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=764 ">fake rolex watches</a>

# April 18, 2007 7:47 PM

Archer said:

Wery nice site! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=768 ">rolex replica</a>

# April 18, 2007 8:03 PM

Cooling said:

Cool web resourses! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=766 ">replica watches</a>

# April 18, 2007 8:06 PM

Promoulters said:

Best site! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=763 ">cheap rolex watches</a>

# April 18, 2007 8:12 PM

Sercjer said:

Cool disign! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=762 ">breitling replica watches</a>

# April 18, 2007 8:18 PM

Spaters said:

Best web pae! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=769 ">rolex replica swiss</a>

# April 19, 2007 12:40 PM

BestMan said:

Cool resourses! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=770 ">rolex replica watches</a>

# April 19, 2007 12:42 PM

pesnik said:

Musikand! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=772 ">watches replica</a>

# April 19, 2007 4:27 PM

pesnik said:

Musikand! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=772 ">watches replica</a>

# April 19, 2007 4:27 PM

Psikolshik said:

privet igrunam! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=771 ">swiss replica watches</a>

# April 19, 2007 4:29 PM

Psikolshik said:

privet igrunam! <ahref=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=771 ">swiss replica watches</a>

# April 19, 2007 4:31 PM

Coleer said:

best replican! <a href=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=768 ">rolex replica</a>

# April 19, 2007 5:01 PM

Coleer said:

best replican! <a href=" https://bugzilla.andrew.cmu.edu/attachment.cgi?id=768 ">rolex replica</a>

# April 19, 2007 5:02 PM

LennyPas said:

# April 19, 2007 8:27 PM

Psikolshik said:

privet igrunam! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=696 ">breitling replica watches</a>

# April 19, 2007 8:57 PM

Psikolshik said:

privet igrunam! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=696 ">breitling replica watches</a>

# April 19, 2007 8:58 PM

pesnik said:

Musikand! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=697 ">cheap rolex watches</a>

# April 19, 2007 8:58 PM

Coleer said:

best replican! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=698 ">fake rolex watches</a>

# April 19, 2007 8:58 PM

pesnik said:

Musikand! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=697 ">cheap rolex watches</a>

# April 19, 2007 9:01 PM

Cloper said:

Gooding replican! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=701 ">rolex replica</a>

# April 20, 2007 12:30 AM

Cloper said:

Gooding replican! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=701 ">rolex replica</a>

# April 20, 2007 12:32 AM

Perlix said:

Best site! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=700 ">replica watches</a>

# April 20, 2007 12:37 AM

Perlix said:

Best site! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=700 ">replica watches</a>

# April 20, 2007 12:38 AM

Perlix said:

Best site! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=700 ">replica watches</a>

# April 20, 2007 12:38 AM

Slonik said:

Good igrunam! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=699 ">replica rolex</a>

# April 20, 2007 12:38 AM

Slonik said:

Good igrunam! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=699 ">replica rolex</a>

# April 20, 2007 12:39 AM

Brolik said:

Nice web page! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=705 ">swiss replica watches</a>

# April 20, 2007 5:58 AM

Brolik said:

Nice web page! <a href=" http://bugzilla.internet2.edu/attachment.cgi?id=705 ">swiss replica watches</a>

# April 20, 2007 5:59 AM

Brent said:

WOW, you have some major comment spam going on! ;) Was just search for how to wire up a button to the click event, that is annoying as hell! It's not just the button though, it is all UI events!!!  

Also, I wanted to add that the idea of using XML for design is not a bad one, but IMO there should be no code at all in the XAML. All the databinding crap sucks. To me it seems as though presentation and code behind are being pushed closer, instead of creating a seperation.  

# August 22, 2007 10:48 AM

Mike said:

In Visual Studio 2008 you double click the button in xaml view and it automatically adds the code behind event handler

# April 23, 2008 12:17 AM

Derik Whittaker said:

@Mike,

Yea, NOW.  Not back when VS2005 was the only game in town.

# April 23, 2008 6:05 AM

Leave a Comment

(required)  
(optional)
(required)  

Enter the numbers above:
Add

About Derik Whittaker

Derik is a .Net Developer/Architect specializing in WinForms working out the northern suburbs of Chicago. He is also believer and advocate for Agile development including SCRUM, TDD, CI, etc.

When Derik is not writing code he can be found spending time with his wife and young son, climbing on his bouldering wall, watching sports (mostly baseball), and generally vegging out. Check out Devlicio.us!

Our Sponsors

Proudly Partnered With


This Blog

Syndication

News