Some thoughts on the RoutedCommand design

I think we have conflated several concepts with RoutedCommands: 1)  The ICommand part with it’s Execute/CanExecute methods … basically this is just a form of method dispatch that lends itself to declarative systems2)  Common Verbs or Actions — these are what we now call built-in commands 3)  The mapping of basic InputGestures (Ctrl-C) to these…


Expression architecture

I’m often asked about the Expression architecture, but have never found the time to really describe the whole thing.  Now Paul Stovell has dug into how it works using Reflector and compares it to Composite WPF (Prism).  Some of what he sees is a case of convergent evolution, though we did talk to the Prism guys at various…


OffTopic: eBooks

My one lifelong hobby is reading.  My house is full of bookcases and my floors are covered with books that don’t fit.  I read a lot of non-fiction:  history, science, philosophy.   I always tell people I haven’t read sci-fi since my early 20s, which really means I only read 2 or 3 sci-fi novels a…


VisualStateManager for desktop WPF

As I’ve described before, we introduced the new VisualStateManager concept into Silverlight WPF before we added the same functionality in desktop WPF, in violation of our general guideline that Silverlight is functionally a subset of the desktop .NET Frameworks.  We are planning to add full VSM support on the desktop, but we haven’t had time to…


How to initialize an attached DependencyProperty of type Collection

I was reading a thread about Commands in the WPF Disciples group and noticed a comment about being unable to initialize an attached property where the type was collection.  The problem was unless you put in an explicit Collection object tag, the property is initialized to null when the XAML parser tries to add to it.  I ran…


Great example of an attached behavior

From Dave Relyea’s blog, Pixel Snapping in Silverlight as an attached behavior:



Recently, I talked about how templates in WPF/SL are fundamentally built around the concept of a state machine, where the condition is a Trigger (desktop WPF) or code (Silverlight) and the new state is a group of Setters (desktop WPF) or a Storyboard (Silverlight).  I hinted that in the future we would be making this more…


PresentationModel and WPF

Julian Dominguez is writing a series about the PresentationModel pattern and using it with WPF. and Glenn Block has just posted a little on the same topic: These two have been thinking a lot about application composition as part of the PRISM project.  WPF is still so new that we still don’t know all…


Visual States in XAML Templates

The Silverlight and desktop WPF implementations of Templates use the same syntax and programming model for describing the tree of objects that make up the control body, but differ in how they describe dynamic changes of the template.  In desktop WPF, this is done using Triggers…for example, a trivial Button Template might look like:        …