VisualStateManager.CustomVisualStateManager Attached Property

Gets or sets the VisualStateManager that transitions between the states of a control.

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

See GetCustomVisualStateManager, SetCustomVisualStateManager
<templateRoot VisualStateManager.CustomVisualStateManager="{StaticResource customVisualStateManagerKey}"/>

XAML Values


The root UIElement of content for a template applied to a control.


An object element for a class that implements a custom VisualStateManager.


A resource key referring to an existing resource in a ResourceDictionary. The resource should be an object element instantiation of a custom VisualStateManager class.

Property Value

Type: System.Windows.VisualStateManager
The VisualStateManager that transitions between the states of a control. The default is Nothing.

Use the CustomVisualStateManager property if you want to implement your own logic for transitioning between states. If CustomVisualStateManager is Nothing, the VisualStateManager uses its own logic to transition between states.


Supported in: 5, 4, 3

Silverlight for Windows Phone

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

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