Friday, July 25, 2008

Josh Smith just published a great article about his solution to using RoutedCommands in WPF.

The problem he solves, has been solved by others before, however, I think this is a very lightweight succinct way of doing it.
Basically, when you set a command to a button, you will have to handle that logic (canExecute and Execute) in the codebehind of the view. Since you are (hopefully) using a MVC, MVP or MVVM approach, you would rather not go through the codebehind of the view, but directly route the commands to the appropriate viewmodel/controller.

He creates a relaying object that does just that. This results in a completely empty codebehind for the view, which is exactly what I like!

Good job Josh!

Friday, July 25, 2008 12:18:25 PM (Romance Standard Time, UTC+01:00)
Thanks a lot, Ruurd. I'm glad you like my approach. It was the most lightweight solution I could think of.

Josh
Thursday, November 04, 2010 4:47:29 AM (Romance Standard Time, UTC+01:00)
http://www.coachusabags.com/
http://www.asics-us.com/
http://www.ukuggus.com/
http://www.mbt-usa.com/
Monday, November 08, 2010 3:24:52 AM (Romance Standard Time, UTC+01:00)
been wearing the MBT Shoes Clearance, I hardly ever wear any of my other shoes. They are everyday shoes now. It’s so comfortable when wearing them.MBT Shoes are sold online with discount prices. We have fast delivery to your home, a large part of region with Free Shipping. Enjoy these high quality cheap <a href="http://www.feetlockers.com/specials.html">MBT discount shoes</a> technology for these new <a href="http://www.feetlockers.com/featured_products.html">cheap MBT shoes</a>. Features adjustable buckles at the forefoot, instep and ankle. Exceptionally soft, moisture-conducting microfiber sock lining and split leather insole provide breathable wear. TPU and glass fiber shank adds firmness to sole construction and also ensures a natural rolling movement of the foot for even weight distribution. PU midsole with pivot is the balancing section <a href="http://www.feetlockers.com/">mbt outlet</a> underneath the metatarsus whic
Monday, November 08, 2010 3:25:02 AM (Romance Standard Time, UTC+01:00)
href="http://www.zigtechshoesonsale.com/mbt-women-shoes-mbt-sports-shoes-c-15_26.html"><strong>Mbt shoes outlet</strong></a> that takes the pain away from your body when you are standing and walking. That's why you need to wear <a href="http://www.zigtechshoesonsale.com/mbt-men-shoes-mbt-casual-shoes-c-8_9.html"><strong>MBT Sandals Shoes</strong></a>.<a href="http://www.zigtechshoesonsale.com/shapeups-sleek-fit-c-29.html"><strong>Skechers Shape Ups</strong></a> Although the designs vary, toners typically have strongly curved, thickened soles.<a href="http://www.zigtechshoesonsale.com/shape-ups-stability-c-28.html"><strong>Skechers Shape ups Shoes</strong></a> From the moment Pat laced them up, <a href="http://www.zigtechshoesonsale.com/mbt-women-shoes-c-15.html"><strong>shape ups sale</strong></a> began to feel off-balance and was afraid she'd take a tumble. Going down stairs was terrifying, even when gripping the banister,<a href="http://www.zigtechshoesonsale.com/mbt-men-shoes-c-8.html"><strong>Skechers Shape
Comments are closed.