Class GoToStateAction
An action that will transition a FrameworkElement to a specified VisualState when invoked.
Inheritance
Implements
Inherited Members
Namespace: Microsoft.Expression.Interactivity.Core
Assembly: OpenSilver.Expression.Interactions.dll
Syntax
public class GoToStateAction : TargetedTriggerAction<FrameworkElement>, 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 SourceStateNameProperty
Declaration
public static readonly DependencyProperty StateNameProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
UseTransitionsProperty
Declaration
public static readonly DependencyProperty UseTransitionsProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceStateName
The name of the VisualState.
Declaration
public string StateName { get; set; }
Property Value
Type | Description |
---|---|
System.String |
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 SourceInvoke(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
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Could not change the target to the specified StateName. |
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
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | Could not locate an appropriate FrameworkElement with states. |