C# Class WinRTXamlToolkit.Interactivity.Behavior

Encapsulates state information and zero or more ICommands into an attachable object.
This is an infrastructure class. Behavior authors should derive from Behavior<T> instead of from this class.
Inheritance: Windows.UI.Xaml.FrameworkElement
Exibir arquivo Open project: xyzzer/WinRTXamlToolkit

Protected Properties

Property Type Description
_associatedObject Windows.UI.Xaml.DependencyObject
_associatedType System.Type

Public Methods

Method Description
Attach ( DependencyObject dependencyObject ) : void

Attaches to the specified object.

Detach ( ) : void

Detaches this instance from its associated object.

Protected Methods

Method Description
OnAttached ( ) : void

Called after the behavior is attached to an AssociatedObject.

Override this to hook up functionality to the AssociatedObject.

OnDetaching ( ) : void

Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred.

Override this to unhook functionality from the AssociatedObject.

OnLoaded ( ) : void

Called after the AssociatedObject is loaded (added to visual tree).

Override this to hook up functionality to the AssociatedObject.

OnUnloaded ( ) : void

Called after the AssociatedObject is unloaded (removed from visual tree).

Override this to hook up functionality to the AssociatedObject.

Private Methods

Method Description
AssociatedFrameworkElementLoaded ( object sender, RoutedEventArgs e ) : void
AssociatedFrameworkElementUnloaded ( object sender, RoutedEventArgs e ) : void

Method Details

Attach() public method

Attaches to the specified object.
/// The Behavior is already hosted on a different element. /// /// dependencyObject does not satisfy the Behavior type constraint. ///
public Attach ( DependencyObject dependencyObject ) : void
dependencyObject Windows.UI.Xaml.DependencyObject /// The object to attach to. ///
return void

Detach() public method

Detaches this instance from its associated object.
public Detach ( ) : void
return void

OnAttached() protected method

Called after the behavior is attached to an AssociatedObject.
Override this to hook up functionality to the AssociatedObject.
protected OnAttached ( ) : void
return void

OnDetaching() protected method

Called when the behavior is being detached from its AssociatedObject, but before it has actually occurred.
Override this to unhook functionality from the AssociatedObject.
protected OnDetaching ( ) : void
return void

OnLoaded() protected method

Called after the AssociatedObject is loaded (added to visual tree).
Override this to hook up functionality to the AssociatedObject.
protected OnLoaded ( ) : void
return void

OnUnloaded() protected method

Called after the AssociatedObject is unloaded (removed from visual tree).
Override this to hook up functionality to the AssociatedObject.
protected OnUnloaded ( ) : void
return void

Property Details

_associatedObject protected_oe property

The backing field for AssociatedObject.
protected DependencyObject,Windows.UI.Xaml _associatedObject
return Windows.UI.Xaml.DependencyObject

_associatedType protected_oe property

The backing field for AssociatedType property.
protected Type,System _associatedType
return System.Type