Reputation: 2099
I hope to make TextBox get focus when a page display. I wrote:
protected override void onManipulationStarted(ManipulationStartedArgs e)
{
textBox1.Focus();
base.onManipulationStarted( e);
}
but there is nothing happned
Welcome any comment
Upvotes: 0
Views: 668
Reputation: 1525
If you want set the focus when page loaded, you have to add the event handler on the event of Loaded of the page.
Write the
textBox1.Focus();
code in the loaded event handler in page.xaml.cs
Upvotes: 1