menu

WinForms

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class VisualStateManager - WindowsForms API Reference | Syncfusion

    Show / Hide Table of Contents

    Class VisualStateManager

    Manages visual states and their transitions on a control.

    Inheritance
    System.Object
    VisualStateManager
    Namespace: Syncfusion.Windows
    Assembly: Syncfusion.Shared.WPF.dll
    Syntax
    public class VisualStateManager : DependencyObject

    Constructors

    VisualStateManager()

    Declaration
    public VisualStateManager()

    Fields

    CustomVisualStateManagerProperty

    Declaration
    public static readonly DependencyProperty CustomVisualStateManagerProperty
    Field Value
    Type
    System.Windows.DependencyProperty

    Methods

    GetCustomVisualStateManager(FrameworkElement)

    Declaration
    public static VisualStateManager GetCustomVisualStateManager(FrameworkElement obj)
    Parameters
    Type Name Description
    System.Windows.FrameworkElement obj
    Returns
    Type
    VisualStateManager

    GetVisualStateGroups(FrameworkElement)

    Declaration
    public static IList GetVisualStateGroups(FrameworkElement obj)
    Parameters
    Type Name Description
    System.Windows.FrameworkElement obj
    Returns
    Type
    System.Collections.IList

    GoToState(Control, String, Boolean)

    Transitions a control's state.

    Declaration
    public static bool GoToState(Control control, string stateName, bool useTransitions)
    Parameters
    Type Name Description
    System.Windows.Controls.Control control

    The control who's state is changing.

    System.String stateName

    The new state that the control is in.

    System.Boolean useTransitions

    Whether to use transition animations.

    Returns
    Type Description
    System.Boolean

    true if the state changed successfully, false otherwise.

    GoToStateCore(Control, FrameworkElement, String, VisualStateGroup, VisualState, Boolean)

    Allows subclasses to override the GoToState logic.

    Declaration
    protected virtual bool GoToStateCore(Control control, FrameworkElement templateRoot, string stateName, VisualStateGroup group, VisualState state, bool useTransitions)
    Parameters
    Type Name Description
    System.Windows.Controls.Control control
    System.Windows.FrameworkElement templateRoot
    System.String stateName
    VisualStateGroup group
    VisualState state
    System.Boolean useTransitions
    Returns
    Type
    System.Boolean

    RaiseCurrentStateChanged(VisualStateGroup, VisualState, VisualState, Control)

    Declaration
    protected void RaiseCurrentStateChanged(VisualStateGroup stateGroup, VisualState oldState, VisualState newState, Control control)
    Parameters
    Type Name Description
    VisualStateGroup stateGroup
    VisualState oldState
    VisualState newState
    System.Windows.Controls.Control control

    RaiseCurrentStateChanging(VisualStateGroup, VisualState, VisualState, Control)

    Declaration
    protected void RaiseCurrentStateChanging(VisualStateGroup stateGroup, VisualState oldState, VisualState newState, Control control)
    Parameters
    Type Name Description
    VisualStateGroup stateGroup
    VisualState oldState
    VisualState newState
    System.Windows.Controls.Control control

    SetCustomVisualStateManager(FrameworkElement, VisualStateManager)

    Declaration
    public static void SetCustomVisualStateManager(FrameworkElement obj, VisualStateManager value)
    Parameters
    Type Name Description
    System.Windows.FrameworkElement obj
    VisualStateManager value
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved