private void floatNumberTextBox_PreviewKeyDown(object sender, KeyEventArgs e) { if (!KinectBase.HelperMethods.NumberKeys.Contains(e.Key) && e.Key != Key.OemPeriod && e.Key != Key.Decimal) { e.Handled = true; } }