Bemærk
Adgang til denne side kræver godkendelse. Du kan prøve at logge på eller ændre mapper.
Adgang til denne side kræver godkendelse. Du kan prøve at ændre mapper.
This example shows how to use the Focus method to set focus on a TextBox control.
Define a simple TextBox control
The following Extensible Application Markup Language (XAML) example describes a simple TextBox control named tbFocusMe
<TextBox Name="tbFocusMe">
This is the text in my text box.
</TextBox>
Set the focus on the TextBox control
The following example calls the Focus method to set the focus on the TextBox control with the Name tbFocusMe.
tbFocusMe.Focus();
tbFocusMe.Focus()
See also
Samarbejd med os på GitHub
Kilden til dette indhold kan findes på GitHub, hvor du også kan oprette og gennemse problemer og pullanmodninger. Du kan få flere oplysninger i vores vejledning til bidragydere.
.NET Desktop feedback