C# Класс 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.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
CreateRegion ( DependencyObject targetElement, string regionName ) : IRegion

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

Приватные методы

Метод Описание
ElementLoaded ( object sender, RoutedEventArgs e ) : void
OnUpdatingRegions ( object sender, EventArgs e ) : void
TryCreateRegion ( ) : void
UnWireTargetElement ( ) : void
WireUpTargetElement ( ) : void

Описание методов

Attach() публичный Метод

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
Результат void

CreateRegion() защищенный Метод

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.
Результат IRegion

DelayedRegionCreationBehavior() публичный Метод

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. ///
Результат Microsoft.Practices.Prism.Properties

Detach() публичный Метод

Stop monitoring the RegionManager and the TargetElement, so that this behavior can be garbage collected.
public Detach ( ) : void
Результат void