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

Behavior that removes the RegionManager attached property of all the views in a region once the RegionManager property of a region becomes null. This is useful when removing views with nested regions, to ensure these nested regions get removed from the RegionManager as well. This behavior does not apply by default. In order to activate it, the ClearChildViews attached property must be set to True in the view containing the affected child regions.
Inheritance: Microsoft.Practices.Prism.Regions.RegionBehavior
ファイルを表示 Open project: xperiandri/PortablePrism Class Usage Examples

Public Properties

Property Type Description
ClearChildViewsProperty DependencyProperty

Public Methods

Method Description
GetClearChildViews ( DependencyObject target ) : bool

Gets the ClearChildViews attached property from a DependencyObject.

SetClearChildViews ( DependencyObject target, bool value ) : void

Sets the ClearChildViews attached property in a DependencyObject.

Protected Methods

Method Description
OnAttach ( ) : void

Subscribes to the Region's PropertyChanged method to monitor its RegionManager property.

Private Methods

Method Description
ClearChildViews ( IRegion region ) : void
Region_PropertyChanged ( object sender, System e ) : void

Method Details

GetClearChildViews() public static method

Gets the ClearChildViews attached property from a DependencyObject.
public static GetClearChildViews ( DependencyObject target ) : bool
target DependencyObject The object from which to get the value.
return bool

OnAttach() protected method

Subscribes to the Region's PropertyChanged method to monitor its RegionManager property.
protected OnAttach ( ) : void
return void

SetClearChildViews() public static method

Sets the ClearChildViews attached property in a DependencyObject.
public static SetClearChildViews ( DependencyObject target, bool value ) : void
target DependencyObject The object in which to set the value.
value bool The value of to set in the target object's ClearChildViews attached property.
return void

Property Details

ClearChildViewsProperty public_oe static_oe property

This attached property can be defined on a view to indicate that regions defined in it must be removed from the region manager when the parent view gets removed from a region.
public static DependencyProperty ClearChildViewsProperty
return DependencyProperty