Freigeben über


GoToStateAction Class

Represents an action that will transition a FrameworkElement to a specified VisualState when executed.

Inheritance Hierarchy

System.Object
  DependencyObject
    Microsoft.Xaml.Interactions.Core.GoToStateAction

Namespace:  Microsoft.Xaml.Interactions.Core
Assembly:  Microsoft.Xaml.Interactions (in Microsoft.Xaml.Interactions.dll)

Syntax

'Declaration
Public NotInheritable Class GoToStateAction _
    Inherits DependencyObject _
    Implements IAction
public sealed class GoToStateAction : DependencyObject, 
    IAction
public ref class GoToStateAction sealed : public DependencyObject, 
    IAction
[<Sealed>]
type GoToStateAction =  
    class 
        inherit DependencyObject 
        interface IAction 
    end
public final class GoToStateAction extends DependencyObject implements IAction

The GoToStateAction type exposes the following members.

Constructors

  Name Description
Public method GoToStateAction Initializes a new instance of the GoToStateAction class.

Top

Properties

  Name Description
Public property Dispatcher (Inherited from DependencyObject.)
Public property StateName Gets or sets the name of the VisualState. This is a dependency property.
Public property TargetObject Gets or sets the target object. This is a dependency property.
Public property UseTransitions Gets or sets whether or not to use a VisualTransition to transition between states. This is a dependency property.

Top

Methods

  Name Description
Public method ClearValue (Inherited from DependencyObject.)
Public method Equals Determines whether the specified object is equal to the current object. (Inherited from Object.)
Public method Execute Executes the action.
Public method GetAnimationBaseValue (Inherited from DependencyObject.)
Public method GetHashCode Serves as the default hash function. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Public method GetValue (Inherited from DependencyObject.)
Public method ReadLocalValue (Inherited from DependencyObject.)
Public method SetValue (Inherited from DependencyObject.)
Public method ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
Public fieldStatic member StateNameProperty Specifies the name of the VisualState.
Public fieldStatic member TargetObjectProperty Specifies the target object.
Public fieldStatic member UseTransitionsProperty Indicates whether or not to use a VisualTransition to transition between states.

Top

Remarks

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

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Xaml.Interactions.Core Namespace

VisualState

TargetObject