C# Class Windows.UI.Interactivity.EventTriggerBase

Represents a trigger that can listen to an object other than its AssociatedObject.
This is an infrastructure class. Trigger authors should derive from EventTriggerBase<T> instead of this class.
Inheritance: TriggerBase
ファイルを表示 Open project: jlaanstra/Windows.UI.Interactivity Class Usage Examples

Public Properties

Property Type Description
SourceNameProperty Windows.UI.Xaml.DependencyProperty
SourceObjectProperty DependencyProperty

Private Properties

Property Type Description
EventTriggerBase System
EventTriggerBase System
IsValidEvent bool
OnBehaviorHostChanged void
OnEventImpl void
OnEventNameChanged void
OnSourceChanged void
OnSourceChangedImpl void
OnSourceNameChanged void
OnSourceNameResolverElementChanged void
OnSourceObjectChanged void
RegisterEvent void
RegisterLoaded void
RegisterSourceChanged void
UnregisterEvent void
UnregisterEventImpl void
UnregisterLoaded void
UnregisterSourceChanged void

Protected Methods

Method Description
GetEventName ( ) : string

Specifies the name of the Event this EventTriggerBase is listening for.

OnAttached ( ) : void

Called after the trigger is attached to an AssociatedObject.

OnDetaching ( ) : void

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

OnEvent ( object eventArgs ) : void

Called when the event associated with this EventTriggerBase is fired. By default, this will invoke all actions on the trigger.

Override this to provide more granular control over when actions associated with this trigger will be invoked.

Private Methods

Method Description
EventTriggerBase ( ) : System
EventTriggerBase ( Type sourceTypeConstraint ) : System
IsValidEvent ( EventInfo eventInfo ) : bool
OnBehaviorHostChanged ( object sender, EventArgs e ) : void
OnEventImpl ( object sender, object eventArgs ) : void
OnEventNameChanged ( string oldEventName, string newEventName ) : void
OnSourceChanged ( object oldSource, object newSource ) : void
OnSourceChangedImpl ( object oldSource, object newSource ) : void

Called when the source changes.

This function should be overridden in derived classes to hook functionality to and unhook functionality from the changing source objects.

OnSourceNameChanged ( DependencyObject obj, DependencyPropertyChangedEventArgs args ) : void
OnSourceNameResolverElementChanged ( object sender, Windows.UI.Interactivity.NameResolvedEventArgs e ) : void
OnSourceObjectChanged ( DependencyObject obj, DependencyPropertyChangedEventArgs args ) : void
RegisterEvent ( object obj, string eventName ) : void
RegisterLoaded ( FrameworkElement associatedElement ) : void
RegisterSourceChanged ( ) : void
UnregisterEvent ( object obj, string eventName ) : void
UnregisterEventImpl ( object obj, string eventName ) : void
UnregisterLoaded ( FrameworkElement associatedElement ) : void
UnregisterSourceChanged ( ) : void

Method Details

GetEventName() protected abstract method

Specifies the name of the Event this EventTriggerBase is listening for.
protected abstract GetEventName ( ) : string
return string

OnAttached() protected method

Called after the trigger is attached to an AssociatedObject.
protected OnAttached ( ) : void
return void

OnDetaching() protected method

Called when the trigger is being detached from its AssociatedObject, but before it has actually occurred.
protected OnDetaching ( ) : void
return void

OnEvent() protected method

Called when the event associated with this EventTriggerBase is fired. By default, this will invoke all actions on the trigger.
Override this to provide more granular control over when actions associated with this trigger will be invoked.
protected OnEvent ( object eventArgs ) : void
eventArgs object The instance containing the event data.
return void

Property Details

SourceNameProperty public_oe static_oe property

public static DependencyProperty,Windows.UI.Xaml SourceNameProperty
return Windows.UI.Xaml.DependencyProperty

SourceObjectProperty public_oe static_oe property

public static DependencyProperty SourceObjectProperty
return DependencyProperty