how to put a focus on a Textbox object on Windows Phone 8.1

Asked

Viewed 83 times

2

Hi, I know it’s a simple question. Before on windows phone 7.5, just put the code this way:

textBox.Focus();

how do I use it in windows phone 8.1? I’m waiting for a response. I want to thank the community beforehand.

  • Try this textbox.Focus(true);

  • Unfortunately it didn’t work, is given the following error message: Error CS7036 There is no argument Given that Corresponds to the required formal Parameter 'value' of 'Control.Focus(Focusstate)'

1 answer

0

To focus on an object, use the property Focus, as follows:

Focus(FocusState);

Example:

In a Textbox called textBox, to set the focus use:

textBox.Focus(FocusState.Pointer);

Browser other questions tagged

You are not signed in. Login or sign up in order to post.