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

Behavior that creates a new IRegion, when the control that will host the IRegion (see TargetElement) is added to the VisualTree. This behavior will use the RegionAdapterMappings class to find the right type of adapter to create the region. After the region is created, this behavior will detach.
Attached property value inheritance is not available in Silverlight, so the current approach walks up the visual tree when requesting a region from a region manager. The RegionManagerRegistrationBehavior is now responsible for walking up the Tree.
Afficher le fichier Open project: xperiandri/PortablePrism Class Usage Examples

Méthodes publiques

Méthode Description
Attach ( ) : void

Start monitoring the RegionManager and the TargetElement to detect when the TargetElement becomes part of the Visual Tree. When that happens, the Region will be created and the behavior will Detach.

DelayedRegionCreationBehavior ( RegionAdapterMappings regionAdapterMappings ) : Microsoft.Practices.Prism.Properties

Initializes a new instance of the DelayedRegionCreationBehavior class.

Detach ( ) : void

Stop monitoring the RegionManager and the TargetElement, so that this behavior can be garbage collected.

Méthodes protégées

Méthode Description
CreateRegion ( DependencyObject targetElement, string regionName ) : IRegion

Method that will create the region, by calling the right IRegionAdapter.

Private Methods

Méthode Description
ElementLoaded ( object sender, RoutedEventArgs e ) : void
OnUpdatingRegions ( object sender, EventArgs e ) : void
TryCreateRegion ( ) : void
UnWireTargetElement ( ) : void
WireUpTargetElement ( ) : void

Method Details

Attach() public méthode

Start monitoring the RegionManager and the TargetElement to detect when the TargetElement becomes part of the Visual Tree. When that happens, the Region will be created and the behavior will Detach.
public Attach ( ) : void
Résultat void

CreateRegion() protected méthode

Method that will create the region, by calling the right IRegionAdapter.
protected CreateRegion ( DependencyObject targetElement, string regionName ) : IRegion
targetElement DependencyObject The target element that will host the .
regionName string Name of the region.
Résultat IRegion

DelayedRegionCreationBehavior() public méthode

Initializes a new instance of the DelayedRegionCreationBehavior class.
public DelayedRegionCreationBehavior ( RegionAdapterMappings regionAdapterMappings ) : Microsoft.Practices.Prism.Properties
regionAdapterMappings RegionAdapterMappings /// The region adapter mappings, that are used to find the correct adapter for /// a given controltype. The controltype is determined by the value. ///
Résultat Microsoft.Practices.Prism.Properties

Detach() public méthode

Stop monitoring the RegionManager and the TargetElement, so that this behavior can be garbage collected.
public Detach ( ) : void
Résultat void