Label::Target Property
Gets or sets the element that receives focus when the user presses the label's access key.
Assembly: PresentationFramework (in PresentationFramework.dll)
You can provide keyboard shortcuts to elements that don't support access keys by giving a Label an access key and setting this property. Assign an access key to a label by placing an underscore immediately before the character that acts as the access key. An access key can be specified in the Content property or by setting Content to an AccessText object.
You cannot use this property to define a UIElement. For example, the following compiles but is not functional: <object.Target><UIElement../></object.Target>. This property provides a reference to an element that is already defined in your application.
Identifier field | |
Metadata properties set to true | None |
<Label Target="nameOfExistingElement"/>
- nameOfExistingElement
The name of UIElement that receives focus when the access key is pressed.
Available since 3.0
Silverlight
Available since 3.0
Label Class
System.Windows.Controls Namespace
How to: Set a Label's Target Property
How to: Create a Control That Has an Access Key and Text Wrapping