TemplateVisualStateAttribute.GroupName Property
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the name of the group that the state belongs to.
public:
property System::String ^ GroupName { System::String ^ get(); void set(System::String ^ value); };
public string GroupName { get; set; }
member this.GroupName : string with get, set
Public Property GroupName As String
The name of the VisualStateGroup that the state belongs to.
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.
[TemplatePart(Name = "UpButtonElement", Type = typeof(RepeatButton))]
[TemplatePart(Name = "DownButtonElement", Type = typeof(RepeatButton))]
[TemplateVisualState(Name = "Positive", GroupName = "ValueStates")]
[TemplateVisualState(Name = "Negative", GroupName = "ValueStates")]
[TemplateVisualState(Name = "Focused", GroupName = "FocusedStates")]
[TemplateVisualState(Name = "Unfocused", GroupName = "FocusedStates")]
public class NumericUpDown : Control
<TemplatePart(Name:="UpButtonElement", Type:=GetType(RepeatButton))> _
<TemplatePart(Name:="DownButtonElement", Type:=GetType(RepeatButton))> _
<TemplateVisualState(Name:="Positive", GroupName:="ValueStates")> _
<TemplateVisualState(Name:="Negative", GroupName:="ValueStates")> _
<TemplateVisualState(Name:="Focused", GroupName:="FocusedStates")> _
<TemplateVisualState(Name:="Unfocused", GroupName:="FocusedStates")> _
Public Class NumericUpDown
Inherits Control
The GroupName property corresponds to the VisualStateGroup.Name property of a VisualStateGroup object. To specify what VisualStateGroup a VisualState belongs in, set the GroupName property.
Prodotto | Versioni |
---|---|
.NET Framework | 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
Windows Desktop | 3.0, 3.1, 5, 6, 7, 8, 9 |
Feedback su .NET
.NET è un progetto di open source. Selezionare un collegamento per fornire feedback: