private bool OnPaste() { if (Clipboard.ContainsText()) { string text = Clipboard.GetText(); if (IsInteger(text)) { return(false); // handle locally } else { if (null != PasteEvent) { PasteEventArgs args = new PasteEventArgs(); args.FieldIndex = FieldIndex; args.Text = text; PasteEvent(this, args); return(true); // let parent handle it } } } return(false); }
private void OnPaste(object sender, PasteEventArgs e) { Text = e.Text; }