Represents the visual appearance of the control when it is in a specific state.
Assembly: PresentationFramework (in PresentationFramework.dll)
Gets a value that indicates whether this instance is currently sealed (read-only).(Inherited from DependencyObject.)
Gets or sets the name of the.
Gets or sets a Storyboard that defines the appearance of the control when it is in the state that is represented by the .
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)
Re-evaluates the effective value for the specified dependency property(Inherited from DependencyObject.)
Returns a string that represents the current object.(Inherited from Object.)
A Button is pressed, its border might be a different color than normal. The class has a Storyboard property that changes the appearance of the control. When the control enters the state that is specified by the VisualState.Name property, the Storyboard begins. When the control exits the state, the Storyboard stops.specifies how the control looks when it is in a certain state. For example, when a
The VisualStateGroup.States property contains objects. VisualStateGroup objects are added to the VisualStateManager.VisualStateGroups attached property, which is defined on the on a FrameworkElement. You can add objects to any FrameworkElement, but they are typically are used in a ControlTemplate of a Control. For information about how to create a ControlTemplate and objects for existing controls, see Customizing the Appearance of an Existing Control by Creating a ControlTemplate. For an example of using objects outside of a ControlTemplate, see the VisualStateManager class.
The following example creates a VisualStateGroup in the ControlTemplate of a Button called CommonStates and adds objects for the states, Normal, Pressed, and MouseOver. The Button also defines a state called Disabled that is in the CommonStatesVisualStateGroup, but the example omits it for brevity. For the entire example, see Customizing the Appearance of an Existing Control by Creating a ControlTemplate.
Available since 4.0
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.