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.
파일 보기 프로젝트 열기: xperiandri/PortablePrism 1 사용 예제들

공개 메소드들

메소드 설명
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