Version

GoToState Method

Use VisualStateManager to change the visual state of the control.
Syntax
'Declaration
 
Public Shared Sub GoToState( _
   ByVal control As Control, _
   ByVal useTransitions As Boolean, _
   ByVal ParamArray stateNames() As String _
) 
public static void GoToState( 
   Control control,
   bool useTransitions,
   params string[] stateNames
)

Parameters

control
Control whose visual state is being changed.
useTransitions
A value indicating whether to use transitions when updating the visual state, or to snap directly to the new visual state.
stateNames
Ordered list of state names and fallback states to transition into. Only the first state to be found will be used.
Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also