SingleSelectedVerticalView.xaml.cs 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. using Vinno.vCloud.ReportTemplate.ViewModel.ViewModels;
  2. using vStation.Presentation.Exams;
  3. using vStation.Utilities;
  4. using vStation.ViewModel.Exams;
  5. namespace vStation.Presentation.ReportTemplate
  6. {
  7. /// <summary>
  8. /// SingleSelectedVerticalView.xaml 的交互逻辑
  9. /// </summary>
  10. public partial class SingleSelectedVerticalView
  11. {
  12. public SingleSelectedVerticalView()
  13. {
  14. InitializeComponent();
  15. }
  16. private void SingleSelectedView_OnPreviewMouseLeftButtonDown(object sender, System.Windows.Input.MouseButtonEventArgs e)
  17. {
  18. var recordCommentWindow = UiTreeHelper.GetParentObject<RecordComments>(this);
  19. if (recordCommentWindow != null)
  20. {
  21. if (recordCommentWindow.DataContext is RecordCommentViewModel recordCommentViewModel &&
  22. DataContext is SingleSelectedVerticalViewModel singleSelectedVerticalViewModel)
  23. {
  24. recordCommentViewModel.CurrentElement = singleSelectedVerticalViewModel;
  25. }
  26. }
  27. }
  28. }
  29. }