Prism to Silverlight
Summary of Changes
The first roadblock in porting to Silverlight is the fact that a dependency injection system currently does not exist for the platform. As such, a lightweight DI system called DILight was created. It is included under the Framework folder and it's very
similar to Unity
. Please be aware that DILight is new and still needs testing. Also be aware that if Unity is ported to Silverlight our intent is to migrate away from DILight.
The next major change from the desktop stems from the fact that Silverlight does not support commands. Currently all of the command infrastructure from Prism has been left out. We are looking at ways of extending the Silverlight control model to support commands
in a limited fashion.
File-Level Change Log
Changes Required for Drop 9158
4/18/2008, 1:19 PM
Silverlight does not have the concept of a command and the ICommand interface does not exist.
All Prism command classes have been removed.
Prism\RegionManager.cs (Line 31)
For RegionProperty dependency property: PropertyMetadata does not exist and cannot be used as the 4th parameter. However, OnSetRegionCallback can be specified directly.
OnSetRegionCallback specified as 4th parameter rather than a new PropertyMetadata.
Prism\Regions\ItemsControlRegion.cs (Lines 109, 129)
Silverlight does not have the concept of a Selector. ListBox, for example, implements it's own SelectedItem property.
Any reference to Selector was changed to ListBox. This is not a reliable solution. If the Silverlight team does not implement selectors we can only hope a more common SelectedItemProperty and / or selection interface is created. I have submitted this to the
Silverlight discussion groups.