using System; using System.Windows; using System.Windows.Input; public class MainClass : Window { [STAThread] public static void Main() { Application app = new Application(); app.Run(new MainClass()); } protected override void OnTextInput(TextCompositionEventArgs args) { base.OnTextInput(args); if (args.Text.Length > 0 && !Char.IsControl(args.Text[0])) Title += args.Text; } }