In general, drop 6 seems working just fine. It contains the following features known from the WPF part:
- modularity
- event broker
- regions
As I previously said, everything is working fine. One thing disturbs me, however. On the very first version of Prism, I was able to use ordinary classes as views, the view was then defined as a data template. So I could have written something like that:
47
48 var downloadItemPresenter = m_Container.Resolve<NavigationItemPresenter>();
49 downloadItemPresenter.Text = "Download";
50
51 m_RegionManager.Regions[RegionNames.NavigationPanel].Add(downloadItemPresenter);
In this example, NavigationItemPresenter represents my custom button. However, there is no explicitly given view - the view is defined via data template. Unfortunately, from unknown reasons, this doesn't work in Silverlight. I receive NullPointerException. After "investigation" it turned out that internally, the view is casted to... DependencyObject!!! Why is that?! I don't known. I even tried to extend the DependencyObject class (yes, it's possible despite the fact many people say it's not), but I got other exceptions. To sum up, I use this release in my small project (small page for the product I'm currently working on, I'll post about it as soon as it's finished), but it's a pity that the cool approach with views defined using data templates doesn't work so far. Highly recommended.
No comments:
Post a Comment