public Window1() { InitializeComponent(); this.PreviewKeyDown += Window_PreKeyDown; this.PreviewTextInput += Window_PreTextInput; }