The latest drop of Composite Application Guidance for WPF and Silverlight (Drop 7) is now available on CodePlex. You can get it here. I’ll talk about a few of the changes here.
Prism drop 7 contains the first scenarios for Commanding. The challenge here is that, in Silverlight, there is no command binding. In the the first version of Prism, we used the existing command binding infrastructure and provided a DelegateCommand to connect ViewModel methods to a command, and CompositeCommand to coordinate activity across multiple ICommands. It turns out that the ICommand interface is available in Silverlight 2, so the latest drop introduces a Command.Click attached property and ClickCommandBehavior that connects any ButtonBase’s click event to an ICommand (such as DelegateCommand).
The behavior also monitors changes to the ICommand’s CanExecute state and will set the button’s IsEnabled property appropriately. The basic relationship between the button, behavior and command looks like this:
With the attached property, setting up the behavior looks very similar to how commanding work in WPF.
We’ve tried to simplify some of the modularity concepts we’ve previously introduced while working on the Directory Lookup and Configuration Based modularity. One of the changes we made was to change ModuleCatalog to allow either placing modules into groups or right to the catalog.
This is particularly useful when you have static module references and you have no need for explicit groups:
Another change from previous versions is how catalog validation and dependencies are solved/resolved. Previously, the ModuleManager had the responsibility for these aspects, this has now been moved to the ModuleCatalog. This allows different catalogs to be used that may have different approaches to viewing validation or dependency resolution. The ModuleManager can ask a ModuleCatalog for dependent modules.
- Finishing the Silverlight version of the RI
- Re-skinning the UI at least for Silverlight