Windows Dev Center

VisualState.Name Property

Gets the name of the VisualState.

Namespace:  System.Windows
Assembly:  System.Windows (in System.Windows.dll)
XMLNS for XAML: Not mapped to an xmlns.

public string Name { get; }
<VisualState x:Name="stateName"/>

XAML Values

stateName

The name of the VisualState. Name is a read-only property, so specify the name of the VisualState by setting x:Name.

Property Value

Type: System.String
The name of the VisualState.

Control authors specify which VisualState objects the control expects to find in its ControlTemplate by putting the TemplateVisualStateAttribute on its class signature. ControlTemplate authors define new VisualState objects and set the Name property to the value specified by the TemplateVisualStateAttribute.Name property.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2015 Microsoft