private void textBoxNumeric_Pasting(object sender, DataObjectPastingEventArgs e) { string input = string.Empty; if (e.DataObject.GetDataPresent(typeof(string))) { if (!this.isNumericInput((string)e.DataObject.GetData(typeof(string)))) e.CancelCommand(); } else e.CancelCommand(); }