TemplateVisualStateAttribute.GroupName Özellik
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Durumun ait olduğu grubun adını alır veya ayarlar.
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
Özellik Değeri
Durumun ait olduğu adı VisualStateGroup .
Örnekler
Aşağıdaki örnek, denetimin sınıf imzasını NumericUpDown gösterir. Bu örnek, denetimin NumericUpDown dört görsel durum kullandığını belirtir. ve adlı iki durum adlandırılmış içindedirValueStatesVisualStateGroup.PositiveNegative name Focused ve adlı diğer iki durum adlandırılmış içindedir VisualStateGroupFocusedStates.Unfocused Tüm örnek için bkz. Özelleştirilebilir Görünüme Sahip Bir Denetim Oluşturma.
[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
Açıklamalar
GroupName özelliği bir VisualStateGroup nesnenin VisualStateGroup.Name özelliğine karşılık gelir. Bir VisualState öğesinin ait olduğu yeri VisualStateGroup belirtmek için özelliğini ayarlayınGroupName.