private void ClBtn_Click(object sender, RoutedEventArgs e) { Color2Tb.Text = ""; Color1Tb.Text = ""; FromBox.Text = ""; ResultTb.Text = ""; ToBox.Text = ""; OperLabel.Content = ""; Color1Tb.Focusable = true; Color1Tb.Focus(); }
private TextBox Focused() { if (Color1Tb.Focus()) { return(Color1Tb); } else if (Color2Tb.Focus()) { return(Color2Tb); } else if (FromBox.Focus()) { return(FromBox); } else { return(Color1Tb); } }
private void Color1Tb_MouseDown(object sender, MouseButtonEventArgs e) { Color1Tb.Focusable = true; Color1Tb.CaretIndex = Color1Tb.CaretIndex; Color1Tb.Focus(); }
private void Window_Loaded(object sender, RoutedEventArgs e) { Color1Tb.Focus(); ToBox.Text = ""; }