If you want the user to be able to focus a specific field with an ALT+Key – eg. ALT+F, you can do it the following way:
1 2 3 4 5 | < Label Target = "{Binding ElementName=Username}" >Enter _Username:</ Label > < TextBox Name = "UserName" Text = "{Binding Username, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" > </ TextBox > |
- Target of Label associates it with the TextBox.
- Underscore _Before a letter makes it accessible via the ALT+Key
If you are from the Web World, you are used to associating labels with inputs via the ID-attribute. Target looks similar.
Leave a Reply