private void LoginPage_Loaded(object sender, RoutedEventArgs e) { // Automatically insert the user name last entered as the login, retrieved // from isolated storage UserNameTextbox.Text = ConfigurationSettings.LastUserName; if (string.IsNullOrEmpty(UserNameTextbox.Text)) { UserNameTextbox.Focus(); } else { PasswordTextbox.Focus(); } }
//------------------------------ Private -------------------------------------- void loginPageLoaded(object sender, RoutedEventArgs e) { System.Windows.Browser.HtmlPage.Plugin.Focus(); UserNameTextbox.Focus(); //var _tbap = new TextBoxAutomationPeer(UserNameTextbox); //( (IValueProvider) _tbap ).SetValue("?"); // Automatically insert the user name last entered as the login, retrieved from isolated storage //UserNameTextbox.Text = ConfigurationSettings.LastUserName; if (UserNameTextbox.Text.Length == 0) { UserNameTextbox.Focus(); } else { PasswordTextbox.Focus(); } }
protected void Page_Load(object sender, EventArgs e) { UserNameTextbox.Focus(); }
private void SetUserName(string UserName) { Logger.InfoFormat("Is username box displayed? {0}", UserNameTextbox.Displayed); UserNameTextbox.Clear(); UserNameTextbox.SendKeys(UserName); }