VisualStateManager.GoToStateCore Method (FrameworkElement, FrameworkElement, String, VisualStateGroup, VisualState, Boolean)
Transitions a control between states.
Assembly: PresentationFramework (in PresentationFramework.dll)
abstract GoToStateCore : control:FrameworkElement * stateGroupsRoot:FrameworkElement * stateName:string * group:VisualStateGroup * state:VisualState * useTransitions:bool -> bool override GoToStateCore : control:FrameworkElement * stateGroupsRoot:FrameworkElement * stateName:string * group:VisualStateGroup * state:VisualState * useTransitions:bool -> bool
The control to transition between states.
The root element that contains the VisualStateManager.
The name of the state to transition to.
The representation of the state to transition to.
Return ValueType: System.Boolean
true if the control successfully transitioned to the new state; otherwise, false.
If the control is already in the stateName state, GoToState takes no action and returns true.
You can implement your own VisualStateManager to provide different logic for transitioning between states. For example, you can change the logic described previously, or you can provide logic to transition between custom animation types. To implement a VisualStateManager, create a class that inherits from VisualStateManager and override the method. To use the custom class, set the CustomVisualStateManager property to an object of your custom type.
Available since 4.0