Quantcast
Channel: patterns & practices: Prism
Viewing all articles
Browse latest Browse all 1878

New Post: SelectorItemsSourceSyncBehavior vs. ItemsSource

$
0
0
Hi Jan,

As far as I know, the Prism library was designed so that significant components of it could be extended or replaced to fit the functionality required in your application. Taking this into account, there is no advice against replacing the SelectorItemsSourceSyncBehavior.

Regarding the implementation of directly mapping the ItemsSource to the Views collection, this is the approach used for regions defined in ItemsControls. The difference between a region in a Selector and in an ItemsControl is that the latest one does not need to synchronize the active view with the control (because all views are considered as active.) This might be the reason behind the difference between the two approaches.

I am not aware of how much you have customized you behavior, but take into account that besides mapping the ItemsSource to the Views collection you will also need to keep in sync the region's active view and the control's selected item manually (including the deactivation of non selected views in the region).

Also, based on my understanding, I believe that data binding can swallow exceptions. Hence, the failing test could be related to this.

Regards,

Damian Cherubini
http://blogs.southworks.net/dcherubini

Viewing all articles
Browse latest Browse all 1878

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>