monsabre
monsabre

Reputation: 2099

textBox get focus

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

Answers (1)

Santhu
Santhu

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

Related Questions