VisualStateUtilities.GoToState Method

Transitions the control between two states.

Namespace: Microsoft.Expression.Interactivity
Assembly: Microsoft.Expression.Interactions (in microsoft.expression.interactions.dll)


Public Shared Function GoToState ( _
    element As FrameworkElement, _
    stateName As String, _
    useTransitions As Boolean _
) As Boolean
Dim element As FrameworkElement
Dim stateName As String
Dim useTransitions As Boolean
Dim returnValue As Boolean

returnValue = VisualStateUtilities.GoToState(element, stateName, useTransitions)
public static bool GoToState (
    FrameworkElement element,
    string stateName,
    bool useTransitions
static bool GoToState (
    FrameworkElement^ element, 
    String^ stateName, 
    bool useTransitions
public static boolean GoToState (
    FrameworkElement element, 
    String stateName, 
    boolean useTransitions
public static function GoToState (
    element : FrameworkElement, 
    stateName : String, 
    useTransitions : boolean
) : boolean



The element to transition between states.


The state to transition to.


True to use a System.Windows.VisualTransition to transition between states; otherwise, false.

Return Value

True if the control successfully transitioned to the new state; otherwise, false.

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


VisualStateUtilities Class
VisualStateUtilities Members
Microsoft.Expression.Interactivity Namespace