Show / Hide Table of Contents

Class TriggerBase

Represents an object that can invoke Actions conditionally.

Inheritance
System.Object
DependencyObject
TriggerBase
EventTriggerBase
TriggerBase<T>
Implements
IAttachedObject
Inherited Members
DependencyObject.GetValue(DependencyProperty)
DependencyObject.SetCurrentValue(DependencyProperty, Object)
DependencyObject.ReadLocalValue(DependencyProperty)
DependencyObject.SetValue(DependencyProperty, Object)
DependencyObject.SetValue(DependencyPropertyKey, Object)
DependencyObject.OnPropertyChanged(DependencyPropertyChangedEventArgs)
DependencyObject.CoerceValue(DependencyProperty)
DependencyObject.Dispatcher
DependencyObject.INTERNAL_OnAttachedToVisualTree()
DependencyObject.INTERNAL_OnDetachedFromVisualTree()
DependencyObject.ClearValue(DependencyProperty)
DependencyObject.ClearValue(DependencyPropertyKey)
DependencyObject.CheckAccess()
DependencyObject.GetAnimationBaseValue(DependencyProperty)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: System.Windows.Interactivity
Assembly: OpenSilver.Interactivity.dll
Syntax
public abstract class TriggerBase : DependencyObject, IDependencyObject, IAttachedObject
Remarks

This is an infrastructure class. Trigger authors should derive from Trigger<T> instead of this class.

Fields

| Improve this Doc View Source

ActionsProperty

Declaration
public static readonly DependencyProperty ActionsProperty
Field Value
Type Description
DependencyProperty

Properties

| Improve this Doc View Source

Actions

Gets the actions associated with this trigger.

Declaration
public TriggerActionCollection Actions { get; }
Property Value
Type Description
TriggerActionCollection

The actions associated with this trigger.

| Improve this Doc View Source

AssociatedObject

Gets the object to which the trigger is attached.

Declaration
protected DependencyObject AssociatedObject { get; }
Property Value
Type Description
DependencyObject

The associated object.

| Improve this Doc View Source

AssociatedObjectTypeConstraint

Gets the type constraint of the associated object.

Declaration
protected virtual Type AssociatedObjectTypeConstraint { get; }
Property Value
Type Description
System.Type

The associated object type constraint.

Methods

| Improve this Doc View Source

Attach(DependencyObject)

Attaches to the specified object.

Declaration
public void Attach(DependencyObject dependencyObject)
Parameters
Type Name Description
DependencyObject dependencyObject

The object to attach to.

Exceptions
Type Condition
System.InvalidOperationException

Cannot host the same trigger on more than one object at a time.

System.InvalidOperationException

dependencyObject does not satisfy the trigger type constraint.

| Improve this Doc View Source

Detach()

Detaches this instance from its associated object.

Declaration
public void Detach()
| Improve this Doc View Source

InvokeActions(Object)

Invoke all actions associated with this trigger.

Declaration
protected void InvokeActions(object parameter)
Parameters
Type Name Description
System.Object parameter
Remarks

Derived classes should call this to fire the trigger.

| Improve this Doc View Source

OnAttached()

Called after the trigger is attached to an AssociatedObject.

Declaration
protected virtual void OnAttached()
| Improve this Doc View Source

OnDetaching()

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

Declaration
protected virtual void OnDetaching()

Events

| Improve this Doc View Source

PreviewInvoke

Event handler for registering to PreviewInvoke.

Declaration
public event EventHandler<PreviewInvokeEventArgs> PreviewInvoke
Event Type
Type Description
System.EventHandler<PreviewInvokeEventArgs>

Explicit Interface Implementations

| Improve this Doc View Source

IAttachedObject.AssociatedObject

Gets the associated object.

Declaration
DependencyObject IAttachedObject.AssociatedObject { get; }
Returns
Type Description
DependencyObject

The associated object.

Implements

IAttachedObject

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestors(DependencyObject)
VisualTreeExtensions.GetVisualAncestorsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualChildren(DependencyObject)
VisualTreeExtensions.GetVisualChildrenAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualDescendants(DependencyObject)
VisualTreeExtensions.GetVisualDescendantsAndSelf(DependencyObject)
VisualTreeExtensions.GetVisualSiblings(DependencyObject)
VisualTreeExtensions.GetVisualSiblingsAndSelf(DependencyObject)
  • Improve this Doc
  • View Source