void TypeBlock_KeyPress(object sender, System.Windows.Forms.KeyPressEventArgs e) { if (e.KeyChar == ' ') { e.Handled = true; NameBlock.SetCursorToTheBeginning(); } }
public override void SetDefaultFocus() { if (!string.IsNullOrEmpty(this.Name)) { Parameters.SetCursorToTheBeginning(); return; } if (this.TypeBlock != null && !string.IsNullOrEmpty(this.TypeBlock.Text)) { NameBlock.SetCursorToTheBeginning(); return; } Modifiers.SetCursorToTheEnd(); }