public MainWindow()
        {
            InitializeComponent();

            mainWinVM = new MainWindowViewModel(this);
            this.DataContext = mainWinVM;
        }
Beispiel #2
0
 public MainWindow()
 {
     sw = new StreamWriter("error.log");
     try
     {
         InitializeComponent();
         sw.WriteLine("init success");
         mainWinVM = new MainWindowViewModel(this);
         sw.WriteLine("VM success");
         this.DataContext = mainWinVM;
     }
     catch (Exception ex)
     {
         sw.WriteLine("Exception details: \r\n" + ex.Message + ex.StackTrace);
     }
     sw.Close();
 }