Show / Hide Table of Contents

Class GoToStateAction

An action that will transition a FrameworkElement to a specified VisualState when invoked.

Inheritance
System.Object
DependencyObject
TriggerAction
TargetedTriggerAction
TargetedTriggerAction<FrameworkElement>
GoToStateAction
Implements
IAttachedObject
Inherited Members
TargetedTriggerAction<FrameworkElement>.Target
TargetedTriggerAction.TargetObjectProperty
TargetedTriggerAction.TargetNameProperty
TargetedTriggerAction.TargetObject
TargetedTriggerAction.TargetName
TargetedTriggerAction.AssociatedObjectTypeConstraint
TargetedTriggerAction.TargetTypeConstraint
TargetedTriggerAction.OnAttached()
TargetedTriggerAction.OnDetaching()
TriggerAction.IsEnabledProperty
TriggerAction.IsEnabled
TriggerAction.AssociatedObject
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: Microsoft.Expression.Interactivity.Core
Assembly: OpenSilver.Expression.Interactions.dll
Syntax
public class GoToStateAction : TargetedTriggerAction<FrameworkElement>, IDependencyObject, IAttachedObject
Remarks

If the TargetName property is set, this action will attempt to change the state of the targeted element. If not, it walks the element tree in an attempt to locate an alternative target that defines states. ControlTemplate and UserControl are two common possibilities.

Fields

| Improve this Doc View Source

StateNameProperty

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

UseTransitionsProperty

Declaration
public static readonly DependencyProperty UseTransitionsProperty
Field Value
Type Description
DependencyProperty

Properties

| Improve this Doc View Source

StateName

The name of the VisualState.

Declaration
public string StateName { get; set; }
Property Value
Type Description
System.String
| Improve this Doc View Source

UseTransitions

Determines whether or not to use a VisualTransition to transition between states.

Declaration
public bool UseTransitions { get; set; }
Property Value
Type Description
System.Boolean

Methods

| Improve this Doc View Source

Invoke(Object)

This method is called when some criteria is met and the action is invoked.

Declaration
protected override void Invoke(object parameter)
Parameters
Type Name Description
System.Object parameter
Overrides
TriggerAction.Invoke(Object)
Exceptions
Type Condition
System.InvalidOperationException

Could not change the target to the specified StateName.

| Improve this Doc View Source

OnTargetChanged(FrameworkElement, FrameworkElement)

Called when the target changes. If the TargetName property isn't set, this action has custom behavior.

Declaration
protected override void OnTargetChanged(FrameworkElement oldTarget, FrameworkElement newTarget)
Parameters
Type Name Description
FrameworkElement oldTarget
FrameworkElement newTarget
Overrides
System.Windows.Interactivity.TargetedTriggerAction<System.Windows.FrameworkElement>.OnTargetChanged(System.Windows.FrameworkElement, System.Windows.FrameworkElement)
Exceptions
Type Condition
System.InvalidOperationException

Could not locate an appropriate FrameworkElement with states.

Implements

IAttachedObject

Extension Methods

DependencyObjectHelper.GetSelfAndAncestors(DependencyObject)
  • Improve this Doc
  • View Source