WPF: More work on MainWindow.