C# Class Microsoft.Practices.Prism.Regions.Behaviors.SelectorItemsSourceSyncBehavior

Defines the attached behavior that keeps the items of the Selector host control in synchronization with the IRegion. This behavior also makes sure that, if you activate a view in a region, the SelectedItem is set. If you set the SelectedItem or SelectedItems (ListBox) then this behavior will also call Activate on the selected items. When calling Activate on a view, you can only select a single active view at a time. By setting the SelectedItems property of a listbox, you can set multiple views to active.
Inheritance: RegionBehavior, IHostAwareRegionBehavior
Show file Open project: xperiandri/PortablePrism Class Usage Examples

Public Properties

Property Type Description
BehaviorKey string

Protected Methods

Method Description
OnAttach ( ) : void

Starts to monitor the IRegion to keep it in synch with the items of the HostControl.

Private Methods

Method Description
ActiveViews_CollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void
HostControlSelectionChanged ( object sender, SelectionChangedEventArgs e ) : void
SynchronizeItems ( ) : void
Views_CollectionChanged ( object sender, NotifyCollectionChangedEventArgs e ) : void

Method Details

OnAttach() protected method

Starts to monitor the IRegion to keep it in synch with the items of the HostControl.
protected OnAttach ( ) : void
return void

Property Details

BehaviorKey public static property

Name that identifies the SelectorItemsSourceSyncBehavior behavior in a collection of RegionsBehaviors.
public static string BehaviorKey
return string