Uwp navigation example and focusing on control

前端 未结 2 458
再見小時候
再見小時候 2021-01-12 09:06

I use uwp navigation example as an example for my application navigation. I need to set the focus on TextBox. I try it on uwp navigation example. For BasicPage I add this co

2条回答
  •  借酒劲吻你
    2021-01-12 09:59

    if you want to focus a textbox programatically. Prevent keyboarddisplay so layoutupdate event wont fire. You can do something like then in page_loaded event do Test1.Focus(FocusState.Programmatic);

提交回复
热议问题