How to Focus an TextBox on Button click

前端 未结 3 830
猫巷女王i
猫巷女王i 2021-01-14 04:55

So how to Focus an TextBox on Button click using the MVVM Pattern?

i created an simple Testproject Based on this Answer which works on the first click, but after tha

3条回答
  •  自闭症患者
    2021-01-14 05:56

    I got the same issue before. I did a trick. In your OnClick method, do something like this:

    if(IsFocus == true)
       IsFocus = false;
    IsFocus = true;
    

提交回复
热议问题