public MainWindow() { ThreadController.SetDispatcher(Dispatcher); StartStopReadCommand = new CommandDelegate { ExecuteHandler = StartStopRead }; InitializeComponent(); DataContext = ViewModel ??= new ViewModel(); Console.SetOut(new StormbusTextWriter(LogTextBox)); }