Show / Hide Table of Contents

Class TargetedTriggerAction

Represents an action that can be targeted to affect an object other than its AssociatedObject.

Inheritance
System.Object
DependencyObject
TriggerAction
TargetedTriggerAction
TargetedTriggerAction<T>
Implements
IAttachedObject
Inherited Members
TriggerAction.IsEnabledProperty
TriggerAction.IsEnabled
TriggerAction.AssociatedObject
TriggerAction.Invoke(Object)
TriggerAction.IAttachedObject.AssociatedObject
TriggerAction.Attach(DependencyObject)
TriggerAction.Detach()
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 TargetedTriggerAction : TriggerAction, IDependencyObject, IAttachedObject
Remarks

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

Fields

| Improve this Doc View Source

TargetNameProperty

Declaration
public static readonly DependencyProperty TargetNameProperty
Field Value
Type Description
DependencyProperty
| Improve this Doc View Source

TargetObjectProperty

Declaration
public static readonly DependencyProperty TargetObjectProperty
Field Value
Type Description
DependencyProperty

Properties

| Improve this Doc View Source

AssociatedObjectTypeConstraint

Gets the associated object type constraint.

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

The associated object type constraint.

Overrides
TriggerAction.AssociatedObjectTypeConstraint
Remarks

Define a TypeConstraintAttribute on a derived type to constrain the types it may be attached to.

| Improve this Doc View Source

Target

Gets the target object. If TargetObject is set, returns TargetObject. Else, if TargetName is not set or cannot be resolved, defaults to the AssociatedObject.

Declaration
protected object Target { get; }
Property Value
Type Description
System.Object

The target object.

Remarks

In general, this property should be used in place of AssociatedObject in derived classes.

Exceptions
Type Condition
System.InvalidOperationException

The Target element does not satisfy the type constraint.

| Improve this Doc View Source

TargetName

Gets or sets the name of the object this action targets. If Target is set, this property is ignored. If Target is not set and TargetName is not set or cannot be resolved, the target will default to the AssociatedObject. This is a dependency property.

Declaration
public string TargetName { get; set; }
Property Value
Type Description
System.String

The name of the target object.

| Improve this Doc View Source

TargetObject

Gets or sets the target object. If TargetObject is not set, the target will look for the object specified by TargetName. If an element referred to by TargetName cannot be found, the target will default to the AssociatedObject. This is a dependency property.

Declaration
public object TargetObject { get; set; }
Property Value
Type Description
System.Object

The target object.

| Improve this Doc View Source

TargetTypeConstraint

Gets the target type constraint.

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

The target type constraint.

Methods

| Improve this Doc View Source

OnAttached()

Called after the action is attached to an AssociatedObject.

Declaration
protected override void OnAttached()
Overrides
TriggerAction.OnAttached()
| Improve this Doc View Source

OnDetaching()

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

Declaration
protected override void OnDetaching()
Overrides
TriggerAction.OnDetaching()

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