/// <summary> /// Button Click event for change of fingerprint thumbnails /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void ChangeThumbnails_Clicked(object sender, RoutedEventArgs e) { // Getting the parent window _parentWindow = Window.GetWindow(this); if (_parentWindow != null) { // New instance of BaseWindowDialog to host this ChangeFingerprint Page BaseWindowDialog windowDialog = new BaseWindowDialog(); // Populating page properties windowDialog.ViewModel.CurrentPage = ApplicationPage.ChangeFingers; windowDialog.ViewModel.PageTitle = "CHANGE OF FINGER REQUEST"; windowDialog.Height = 660; windowDialog.Width = 1000; windowDialog.ViewModel.IsRestoreButtonVisible = true; // Setting the overlay of parent window to true ((WindowViewModel)_parentWindow.DataContext).IsWindowOverlayVisible = true; // Removing Parent window overlay on closing of this window windowDialog.Closing += (o, args) => ((WindowViewModel)_parentWindow.DataContext).IsWindowOverlayVisible = false; // Show the new window windowDialog.ShowDialog(); } }
/// <summary> /// On clicking of New Enrollment button /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void NewEnrollmentBtn_Clicked(object sender, RoutedEventArgs e) { // Getting the parent window _parentWindow = Window.GetWindow(this); if (_parentWindow != null) { //Instance of BaseWindowDialog to host NewEnrollment Page BaseWindowDialog window = new BaseWindowDialog(); //Instantiating the window properties window.ViewModel.CurrentPage = ApplicationPage.EnrollmentType; window.ViewModel.PageTitle = "SELECT ENROLLMENT TYPE"; window.Height = 350; window.Width = 620; // Setting the overlay of parent window to true ((WindowViewModel)_parentWindow.DataContext).IsWindowOverlayVisible = true; // Removing Parent window overlay on closing of this window window.Closing += (o, args) => ((WindowViewModel)_parentWindow.DataContext).IsWindowOverlayVisible = false; //Show Enrollment Type Window window.ShowDialog(); } }