DialogWindow.cs 643 B

123456789101112131415161718192021222324252627
  1. using Prism.Services.Dialogs;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7. using System.Windows;
  8. namespace PDF_Master.CustomControl
  9. {
  10. /// <summary>
  11. /// 为解决 拖拽打开加密文档时,解密弹窗偶现不属于主窗体的问题,重写Prism dialog
  12. /// </summary>
  13. public class DialogWindow : Window, IDialogWindow
  14. {
  15. public IDialogResult Result { get; set; }
  16. public DialogWindow()
  17. {
  18. if(Owner==null)
  19. {
  20. Owner = Application.Current.MainWindow;
  21. }
  22. }
  23. }
  24. }