C# Class WPF.JoshSmith.ServiceProviders.UI.UnloadedManager

A service provider class which provides a means of releasing resources when a FrameworkElement's Unloaded event fires. If the DataContext of the element implements IUnloadable, it's Unload method will be invoked when the elements Unloaded event fires.
Documentation: http://web.archive.org/web/20070127124811/http://www.infusionblogs.com/blogs/jsmith/archive/2006/10/28/917.aspx
Exibir arquivo Open project: Warewolf-ESB/Warewolf

Public Properties

Property Type Description
IsManagedProperty System.Windows.DependencyProperty

Public Methods

Method Description
GetIsManaged ( FrameworkElement element ) : bool

Returns true if the specified FrameworkElement's Unloaded event will cause the UnloadedManager to unload its associated data object, else false

SetIsManaged ( FrameworkElement element, bool value ) : void

Sets the IsManaged attached property for the specified FrameworkElement.

Private Methods

Method Description
OnIsManagedChanged ( DependencyObject depObj, System.Windows.DependencyPropertyChangedEventArgs e ) : void
OnManagedFrameworkElementUnloaded ( object sender, RoutedEventArgs e ) : void

Method Details

GetIsManaged() public static method

Returns true if the specified FrameworkElement's Unloaded event will cause the UnloadedManager to unload its associated data object, else false
public static GetIsManaged ( FrameworkElement element ) : bool
element System.Windows.FrameworkElement The FrameworkElement to check if it is managed or not.
return bool

SetIsManaged() public static method

Sets the IsManaged attached property for the specified FrameworkElement.
public static SetIsManaged ( FrameworkElement element, bool value ) : void
element System.Windows.FrameworkElement The FrameworkElement to be managed or unmanaged.
value bool True if the element should be managed by the UnloadedManager.
return void

Property Details

IsManagedProperty public_oe static_oe property

Identifies the UnloadedManager's IsManaged attached property. This field is read-only.
public static DependencyProperty,System.Windows IsManagedProperty
return System.Windows.DependencyProperty