Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TemplateVisualStateAttribute::Name Property

 

Gets or sets the name of the state that the control can be in.

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

public:
property String^ Name {
	String^ get();
	void set(String^ value);
}

Property Value

Type: System::String^

The name of the state that the control can be in.

The TemplateVisualStateAttribute::Name property corresponds to the VisualState::Name property of a VisualState. To specify what VisualState belongs in a control's ControlTemplate, set the TemplateVisualStateAttribute::Name property.

The following example shows the class signature for the NumericUpDown control. This example specifies that the NumericUpDown control uses four visual states. Two states, named Positive and Negative, are in the VisualStateGroup named ValueStates. The other two states, name Focused and Unfocused, are in the VisualStateGroup named FocusedStates. For the entire example, see Creating a Control That Has a Customizable Appearance.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 4.0
Silverlight
Available since 2.0
Windows Phone Silverlight
Available since 7.0
Return to top
Show:
© 2017 Microsoft