MainContent.xaml.cs 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. using PDF_Master.ViewModels;
  2. using Prism.Ioc;
  3. using Prism.Regions;
  4. using System;
  5. using System.Collections.Generic;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows;
  10. using System.Windows.Controls;
  11. using System.Windows.Data;
  12. using System.Windows.Documents;
  13. using System.Windows.Input;
  14. using System.Windows.Media;
  15. using System.Windows.Media.Imaging;
  16. using System.Windows.Navigation;
  17. using System.Windows.Shapes;
  18. namespace PDF_Master.Views
  19. {
  20. /// <summary>
  21. /// MainContent.xaml 的交互逻辑
  22. /// </summary>
  23. public partial class MainContent : UserControl
  24. {
  25. /// <summary>
  26. /// 用来区分每个页签的唯一识别码,避免聚合事件重复订阅
  27. /// </summary>
  28. public string Unicode { get; set; }
  29. /// <summary>
  30. /// 保存单个页签内各ContentRegionName的Value
  31. /// 方便不同跨模块控制Region导肮
  32. /// </summary>
  33. public Dictionary<string, string> RegionContentNames { get; set; }
  34. /// <summary>
  35. /// 是否处于标记密文模式
  36. /// </summary>
  37. public bool IsInReadctonMode { get; set; } = false;
  38. public MainContent()
  39. {
  40. InitializeComponent();
  41. RegionContentNames = new Dictionary<string, string>();
  42. Unicode = Guid.NewGuid().ToString();
  43. //初始化时 更新selected 对象,比UI自动更新更快
  44. App.mainWindowViewModel.SelectedItem = this;
  45. }
  46. }
  47. }