Archive for March, 2010
I’ve finished updating the SoapBox Core Documentation Wiki for version 2010.03.17. Sorry that took so long. One of the most interesting new features is the ability to have extensible context menus using the Model-View-ViewModel pattern, meaning the IMenuItem object can get a reference to the ViewModel that opened the context menu.
I’ve just pushed the latest version of SoapBox Core (2010.03.17) and the Pin Ball Demo to the SVN repository. You can download them from the downloads page. This release has some new features and improvements to existing functionality:
- Moved NotifyPropertyChangedHelper into a new Assembly: SoapBox.Utilities
- Added SoapBox.Core.Messaging (an implementation of the new IMessagingService interface)
- Added SoapBox.Core.FileDialog (an implementation of the new IFileDialogService interface) which provides ViewModels for Open and Save dialog boxes
- Uses IPartImportsSatisfiedNotification instead of ImportingConstructor, which is a better way to use MEF
- IDocument and AbstractDocument are now document factories. For instance, you can define a text editor document, and it can create new instances of itself every time the user opens a document. The default implementation is to return itself, but that can be overridden. (Thanks to ipeksinan over at the CodeProject Article about SoapBox Core for pointing out the deficiency.)
- Significant changes to LayoutManager (and ILayoutManager):
- LayoutManager now doesn’t save to its own files or auto-restore when you launch, it just gives you a blob on SaveLayout which you can pass back to RestoreLayout. This works much better as you can save the layout in your own user file, and restore it when they open that file, project or solution. Note that the blob is standard base64 encoded, plus a couple of period characters (.) so it’s easy to stuff into other containers, like XML documents.
- Added HidePad(…)
- Added HideAllPads()
- Added CloseDocument(…)
- Added CloseAllDocuments()
- IMenuItem/AbstractMenuItem now supports context menus. I’ll have to post some code on the documentation wiki to explain how it works.
- Added a ShutdownCommands extension point to SoapBox.Core.Host
- Added an Extensions namespace to SoapBox.Core. This is where all the individual extensions within SoapBox Core are defined (like the default menu items, etc.) so they’re now strongly typed instead of being hard coded strings. So if you wanted to insert a menu item before File, you could reference it as SoapBox.Core.Extensions.Workbench.MainMenu.File and use that in your InsertRelativeToID property. I suggest setting up an Extensions namespace the same way in your own application.