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:        …



A few months ago I was interviewed by Craig Shoemaker of Pixel8 about my experiences with Expression and WPF.  The podcast is up now at:


We’re hiring


AttachedBehavior pattern sample

The ClickBehavior is about the simplest I can think of.  For illustration purposes I only included one command, but LeftClickCommand, DoubleClickCommand, MouseOverCommand etc. are all obvious extensions:   public static class ClickBehavior     {         public static DependencyProperty RightClickCommandProperty = DependencyProperty.RegisterAttached(“RightClick”,                     typeof(ICommand),                     typeof(ClickBehavior),                     new FrameworkPropertyMetadata(null, new PropertyChangedCallback(ClickBehavior.RightClickChanged)));           public static void…


.NET 3.5 SP1 Beta and WPF

Scott’s blog has an extensive list of the new stuff:  If you scroll down about half way, you’ll find the WPF features:  better startup performance, target performance fixes in the other areas, a new hardware accelerated graphics effects architecture, DirectX interop and a series of data enhancements, most notably better support for writing data…


The Attached Behavior pattern

My favorite feature of WPF (desktop and web versions) is attached properties.  It would be good enough if attached properties merely enabled things like keeping layout properties (Canvas.Left) organized by the type of container rather than the type of content, but they also enable a great little design pattern:  Attached Behavior. Nikhil recently blogged about…


Silverlight: the art of subsetting

I am an architect of WPF, both the full desktop version and the subset that provides the UI framework for Silverlight.  This subsetting exercise raises challenges I’ve not run into before when designing software.  Simply put, how do we keep the framework small without completely changing the programming model?  Keeping it small is relatively easy:  just…