Share via


VisualStateUtilities.GoToState Method

Transitions the control between two states.

Namespace:  Microsoft.Xaml.Interactivity
Assembly:  Microsoft.Xaml.Interactivity (in Microsoft.Xaml.Interactivity.dll)

Syntax

'Declaration
Public Shared Function GoToState ( _
    control As Control, _
    stateName As String, _
    useTransitions As Boolean _
) As Boolean
public static bool GoToState(
    Control control,
    string stateName,
    bool useTransitions
)
public:
static bool GoToState(
    Control^ control, 
    String^ stateName, 
    bool useTransitions
)
static member GoToState : 
        control:Control * 
        stateName:string * 
        useTransitions:bool -> bool
public static function GoToState(
    control : Control, 
    stateName : String, 
    useTransitions : boolean
) : boolean

Parameters

  • control
    Type: Control

    The Control to transition between states.

Return Value

Type: System.Boolean
true if the control is successfully transitioned to the new state; otherwise, false.

Exceptions

Exception Condition
ArgumentNullException

control or stateName is null.

.NET Framework Security

See Also

Reference

VisualStateUtilities Class

Microsoft.Xaml.Interactivity Namespace