How to set focus on TextBox in Silverlight 4 out-of-browser popup

后端 未结 6 1034
后悔当初
后悔当初 2020-12-18 10:30

I have a simple ChildWindow popup in Silverlight 4 (beta).

Important: This is an out-of-browser application.

i want to auto

6条回答
  •  囚心锁ツ
    2020-12-18 11:02

    Thanks for all the post, but i have find the work done through following.

    private void UserControl_Loaded(object sender, RoutedEventArgs e)
        {
            if (App.Current.IsRunningOutOfBrowser)
            {
                txtSalesOrderNo.Focus(); 
            }
            else
            {
                System.Windows.Browser.HtmlPage.Plugin.Focus();
                txtSalesOrderNo.Focus(); 
            }
    
        }
    

提交回复
热议问题