State Manager. Go ToState Core(FrameworkElement, FrameworkElement, String, VisualStateGroup, VisualState, Boolean) Method
Transitions a control between states.
protected: virtual bool GoToStateCore(System::Windows::FrameworkElement ^ control, System::Windows::FrameworkElement ^ stateGroupsRoot, System::String ^ stateName, System::Windows::VisualStateGroup ^ group, System::Windows::VisualState ^ state, bool useTransitions);
protected virtual bool GoToStateCore (System.Windows.FrameworkElement control, System.Windows.FrameworkElement stateGroupsRoot, string stateName, System.Windows.VisualStateGroup group, System.Windows.VisualState state, bool useTransitions);
abstract member GoToStateCore : System.Windows.FrameworkElement * System.Windows.FrameworkElement * string * System.Windows.VisualStateGroup * System.Windows.VisualState * bool -> bool override this.GoToStateCore : System.Windows.FrameworkElement * System.Windows.FrameworkElement * string * System.Windows.VisualStateGroup * System.Windows.VisualState * bool -> bool
Protected Overridable Function GoToStateCore (control As FrameworkElement, stateGroupsRoot As FrameworkElement, stateName As String, group As VisualStateGroup, state As VisualState, useTransitions As Boolean) As Boolean
The control to transition between states.
The name of the state to transition to.
The representation of the state to transition to.
true to use a VisualTransition object to transition between states; otherwise,
true if the control successfully transitioned to the new state; otherwise,
The GoToStateCore method performs the logic necessary to appropriately start and stop the storyboards that are associated with a transition. When a control calls GoToState to change its state, the VisualStateManager does the following:
If the control is already in the
stateNamestate, GoToState takes no action and returns
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 GoToStateCore method. To use the custom class, set the CustomVisualStateManager property to an object of your custom type.