Topics: Prism v2 - WPF 3.5
Feb 26, 2009 at 9:41 AM

Yesterday we did try to go from Prism v1 to Prism v2 in our WPF application.
Now some functionality isn't working anymore, it all has to do with region behavior.

When activating a view in a TabControl region then all the other views automaticaly deactivated, even if someone else said it has to deactive.
Now it only works when the TabControl itself says it.

We have a workregion defined in xaml
<TabControl Name="WorkRegion" cal:RegionManager.RegionName="WorkRegion"




And from a listview in another region we can 'navigate' thru our active views.
In our application layer we don't allow a presenter or view without a controller, so each usecase there is always an controller.
Until now we didn't need to deactive another controller because like i wrote above, it automaticaly became deactivated because it presents a view that deactivated.

I see that alot changed in Prism v2 with Region Behaviors.

The SelectorItemsSourceSyncBehavior is being hit after calling the Region.Deactive(view), but the sender and the source are differend when the navigate listview says it.
Line 182:   if source == sender   --> false

I don't know if this is supposed to be this way, or if i can replace the behavior with SingleActiveRegion or something (plz explain how) hehe

Raymond de Jong

Feb 26, 2009 at 1:06 PM
Hi Raymond,

This is a known issue with Prism 2.0.
Because there is a high severity issue with the brand new update of Silverlight (read about it here), we will be creating a new release that fixes that issue, and we were able to squeeze a fix for the TabControl behavior that you are experiencing, to make it work as in Prism 1.0.
As of now, only these 2 issues will be fixed, and there will be no other change to the current release.

Make sure to check back here very soon,
Julian Dominguez

Feb 26, 2009 at 3:27 PM
Ok, glad to hear that it's wrong behavior and marked as a bug.
I'll wait with patience for the next release (or official bugfix)

Feb 26, 2009 at 7:57 PM
We've refreshed the release so this should work as it did in V1.  You can get it from MSDN.
Let us know if the fix solves your problem.
Feb 27, 2009 at 11:48 AM
The fix solved my problem!

Our chicken is now happy :)
If u know what i mean hehe, perhaps it might be strange language to u.
Feb 27, 2009 at 1:08 PM
Good to know that it works for you too.

By the way, it's not a strange language. Patterns & Practices is all about agile.
You can check this blog post (from Glenn Block in Prism v1): The Prism Team and How We Develop
Or even Ade Miller's blog (p&p's dev lead) where you'll find several posts about agile, and even a scrum bestiary (not only chickens & pigs there).

Julian Dominguez