DILight Suggestion

May 21, 2008 at 8:12 PM
Concerning the method that DILight uses to select a constructor -- if I understand correctly, Unity selects the constructor with the largest number of parameters, whereas DILight selects the first constructor.  It was simple enough to implement this behavior.  I just thought I'd let you know that I consider it a useful feature.

As an aside, I downloaded the latest Prism build (11609 as of this writing) and ported it to Silverlight using DILight.  Other than the problems mentioned on this site (commands, etc), the main problem I ran into was with the new region code - Silverlight doesn't support the DependencyPropertyDescriptor class.  I got around this by creating an OnRegionManagerChanged handler that would quit early if there was no assigned RegionName on the component.

I also tried implementing the view model in Prism's ViewModelCompositionSpike and ran into the issue that Silverlight beta 1 doesn't support DataTemplate.DataType, so I had to use a UserControl for the view.  Oh well.  If anyone has any ideas on how to still use DataTemplates given this limitation, please let me know.
Jul 4, 2008 at 9:16 PM
Thanks for your thoughts dcstraw. Those are good points about DILight and we'll certainly keep them in mind for the upcomming release. Now that Prism has hit RTM, we really need to get PrismAG up to par. Good news is that we've got some new contributors so we'll see how quickly we can make this happen.

We'll also keep your notes handy for the DependencyyPropertyDescriptor bit. Sounds like you have a good workaround.

Jul 16, 2008 at 3:30 PM
It looks like, thanks to Michael Sync, that the next release of PrismAG will switch to supporting Unity for Silverlight!

We're still working on getting it hosted within Unity Contributions, but that should be resolved shortly.

For more info see: http://michaelsync.net/2008/07/11/unity-application-block-unity-for-silverlight-and-stoplight-quickstart