using System;
using System.Windows.Controls;
using System.Windows.Input;
namespace Common.Controls
{
public class TextBoxDoubleEx : TextBox
{
public TextBoxDoubleEx()
{
this.KeyDown += TextBoxEx_KeyDown;
this.TextChanged += TextBoxEx_TextChanged;
}
void TextBoxEx_TextChanged(object sender, TextChangedEventArgs e)
{
//屏蔽中文输入和非法字符粘贴输入
var textBox = sender as TextBox;
var change = new TextChange[e.Changes.Count];
e.Changes.CopyTo(change, 0);
using System.Windows.Controls;
using System.Windows.Input;
namespace Common.Controls
{
public class TextBoxDoubleEx : TextBox
{
public TextBoxDoubleEx()
{
this.KeyDown += TextBoxEx_KeyDown;
this.TextChanged += TextBoxEx_TextChanged;
}
void TextBoxEx_TextChanged(object sender, TextChangedEventArgs e)
{
//屏蔽中文输入和非法字符粘贴输入
var textBox = sender as TextBox;
var change = new TextChange[e.Changes.Count];
e.Changes.CopyTo(change, 0);