Hi,
I am very desperately needed solution to below problem.If you know please let me know.
I have WPF web browser project.On Page1.xaml I have wpf usercontrol usrcntl1. This usrcntl1 is having three textboxes txtBox1,txtBox2,txtBox3.
As per business logic once user entered values in user control's textboxes (on Page1.xaml), i will validate txtBox1,txtBox2,txtBox3 values. if any wrong value entered i will want to set focus on txtBox1.
I am not able to set the focus on usercontrol's textbox. if you have any solution please let me know.
update patquotdet set qdindtslno=1 where qdpnarefno='800016692'
and qdpnaslno=3
thanks
Bkhan.
解决方案There is no such thing as "cursor focus". All focus activity is about the keyboard focus, nothing else.
WPF has a dedicated system pertaining to focus you should learn: http://msdn.microsoft.com/en-us/library/aa969768.aspx[^].
Nevertheless, in many case, the simplest thing works: call Control.Focus, in particular, TextBox.Focus. See:
http://msdn.microsoft.com/en-us/library/system.windows.controls.control.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.uielement.focus.aspx[^].
—SA