Share via


VisualStateUtilities.GoToState Method

Transitions the control between two states.

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

Syntax

'Declaration
Public Shared Function GoToState ( _
    element As FrameworkElement, _
    stateName As String, _
    useTransitions As Boolean _
) As Boolean
'Usage
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
)
public:
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

Parameters

element

The element to transition between states.

stateName

The state to transition to.

useTransitions

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

Reference

VisualStateUtilities Class
VisualStateUtilities Members
Microsoft.Expression.Interactivity Namespace