private void btnOpenView_Click(object sender, RoutedEventArgs e) { UserControl view = new UserControl(); switch (((Button)sender).Tag.ToString()) { case "ImportCheck": view = new Views.ImportCheckView(); break; case "Project": view = new ProjectView(); break; case "Employee": view = new EmployeeView(); break; case "StaffAllocate": view = new StaffAllocateView(); break; case "Monthly": view = new MonthlyStatisticView(); break; default: break; } ChangeView(view); }
private void MainWindow_Loaded(object sender, RoutedEventArgs e) { var view = new Views.ImportCheckView(); ChangeView(view); }