Label.Target 속성

정의

사용자가 레이블의 선택키를 누를 때 포커스를 받는 요소를 가져오거나 설정합니다.

public:
 property System::Windows::UIElement ^ Target { System::Windows::UIElement ^ get(); void set(System::Windows::UIElement ^ value); };
public System.Windows.UIElement Target { get; set; }
[System.ComponentModel.TypeConverter(typeof(System.Windows.Markup.NameReferenceConverter))]
public System.Windows.UIElement Target { get; set; }
member this.Target : System.Windows.UIElement with get, set
[<System.ComponentModel.TypeConverter(typeof(System.Windows.Markup.NameReferenceConverter))>]
member this.Target : System.Windows.UIElement with get, set
Public Property Target As UIElement

속성 값

UIElement

사용자가 선택키를 누를 때 포커스를 받는 UIElement입니다. 기본값은 null입니다.

특성

예제

다음 예제에서는 TargetLabel 속성을 설정하는 방법을 보여 줍니다.

<TextBox Name="tb" Width="50"/>
<Label Target="{Binding ElementName=tb}">_File</Label>

설명

액세스 키를 제공하고 Label 이 속성을 설정하여 액세스 키를 지원하지 않는 요소에 바로 가기 키를 제공할 수 있습니다. 액세스 키 역할을 하는 문자 바로 앞에 밑줄을 배치하여 레이블에 액세스 키를 할당합니다. 액세스 키는 속성 또는 Content 개체로 설정 Content 하여 AccessText 지정할 수 있습니다.

이 속성을 사용하여 .를 UIElement정의할 수 없습니다. 예를 들어 다음 컴파일하지만 기능 <object.Target><UIElement../></object.Target>하지 않습니다. 이 속성은 애플리케이션에서 이미 정의 되어 있는 요소에 대 한 참조를 제공 합니다.

종속성 속성 정보

식별자 필드 TargetProperty
메타 데이터 속성 설정 true 없음

XAML 특성 사용

<Label Target=" nameOfExistingElement"/>  

XAML 속성 요소 사용

XAML 값

nameOfExistingElement
액세스 키를 누를 때 포커스를 받는 이름 UIElement 입니다.

적용 대상

추가 정보