private void TweetBox_MouseEnter(object sender, EventArgs e) { if (ActiveForm == this) { TweetBox.Focus(); } }
public void SetReply(long statusId, string screenName) { replyStatusId = statusId; TweetBox.Text = "@" + screenName + " "; SendButton.Text = "返神" + (140 - TweetBox.TextLength).ToString(); sendMode = SendMode.Reply; TweetBox.Focus(); TweetBox.Select(TweetBox.Text.Length, 0); }
protected override void OnNavigatedTo(System.Windows.Navigation.NavigationEventArgs e) #endif { TweetBox.Focus(); base.OnNavigatedTo(e); #if WP8 if (e.NavigationMode == System.Windows.Navigation.NavigationMode.New && NavigationContext.QueryString.ContainsKey("voiceCommandName")) { StartSpeechToText(); } #endif }