VisualStateManager.GoToStateCore Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Transitions a control between states.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)

Syntax

'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
protected virtual bool GoToStateCore(
    Control control,
    FrameworkElement templateRoot,
    string stateName,
    VisualStateGroup group,
    VisualState state,
    bool useTransitions
)

Parameters

  • stateName
    Type: System.String
    The name of the state to transition to.

Return Value

Type: System.Boolean
true 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, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.