.NET Framework Class Library for Silverlight
VisualStateManager.GoToStateCore Method
Transitions a control between states.
Namespace: System.Windows
Assembly: System.Windows (in System.Windows.dll)
Syntax
Visual Basic (Declaration)
Protected Overridable Function GoToStateCore ( _ control As Control, _ templateRoot As FrameworkElement, _ stateName As String, _ group As VisualStateGroup, _ state As VisualState, _ useTransitions As Boolean _ ) As Boolean
C#
protected virtual bool GoToStateCore( Control control, FrameworkElement templateRoot, string stateName, VisualStateGroup group, VisualState state, bool useTransitions )
Parameters
- control
- Type: System.Windows.Controls.Control
The control to transition between states.
- templateRoot
- Type: System.Windows.FrameworkElement
The root element of the control's ControlTemplate.
- stateName
- Type: System.String
The name of the state to transition to.
- group
- Type: System.Windows.VisualStateGroup
The VisualStateGroup that the state belongs to.
- state
- Type: System.Windows.VisualState
The representation of the state to transition to.
- useTransitions
- Type: System.Boolean
true to use a VisualTransition to transition between states; otherwise, false.
Return Value
Type: System.Booleantrue if the control successfully transitioned to the new state; otherwise, false.
Remarks
Override the GoToStateCore method. Then set the VisualStateManager.CustomVisualStateManager attached property on the control that uses the custom logic.
Version Information
Silverlight
Supported in: 5, 4, 3Silverlight for Windows Phone
Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0Platforms
For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.
See Also