TemplateVisualStateAttribute.Name 속성
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
컨트롤이 있을 수 있는 상태의 이름을 가져오거나 설정합니다.
public:
property System::String ^ Name { System::String ^ get(); void set(System::String ^ value); };
public string Name { get; set; }
member this.Name : string with get, set
Public Property Name As String
속성 값
컨트롤이 있을 수 있는 상태의 이름입니다.
예제
다음 예제에서는 컨트롤에 대 한 클래스 시그니처를 보여 있습니다 NumericUpDown . 이 예제에서는 컨트롤에 NumericUpDown 4개의 시각적 상태를 사용 하 여 지정 합니다. 명명된 두 Negative개의 상태는 명명ValueStates된 상태입니다VisualStateGroup.Positive 이름 및 Unfocused다른 두 상태는 Focused 명명FocusedStates된 상태입니다VisualStateGroup. 전체 예제는 사용자 지정 가능한 모양이 있는 컨트롤 만들기를 참조하세요.
[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
설명
속성은 TemplateVisualStateAttribute.Name .의 속성에 VisualState.Name 해당합니다 VisualState. 컨트롤ControlTemplate에 속하는 내용을 VisualState 지정하려면 속성을 설정합니다TemplateVisualStateAttribute.Name.