wpf infrastructure & main window