98 次代碼提交 2637112e7e ... 2248d4888e

作者 SHA1 備註 提交日期
  zhuyi 2248d4888e Merge remote-tracking branch 'origin/compdfkit_demo_win' into compdfkit_demo_win_rebuild 11 月之前
  liuaoran bd9f1e3cc0 compdfkit(win) - 优化顶部显示细节 11 月之前
  liuaoran 1c2e70a29b compdfkit(win) - 更新nuget -> 1.11.0 11 月之前
  weixiangjie 2db5235331 compdfkit(win) - 优化搜索性能,进度条 11 月之前
  weixiangjie c6efcb1892 compdfkit(win) - 添加判断是否有权限方法 1 年之前
  liuaoran 7c384211fe compdfkit(win) - PDFPage Samples: Array List -> List<int> 1 年之前
  weixiangjie 78a9fbd59e compdfkit(win) - 文案走查->修复 1 年之前
  weixiangjie f87f98758d compdfkit(win) - V1.11.0 版本号更新和拼写更正 1 年之前
  weixiangjie c49818ad6d compdfkit(win) - V1.11.0项目确认 1 年之前
  weixiangjie 7c28de208b compdfkit(win) - 导入注释刷新外观,最近文档固定只展示SampleFile 1 年之前
  weixiangjie 80bbb90525 compdfkit(win) - 细节问题修复,更新DLL 1 年之前
  weixiangjie 13302c382b compdfkit(win) - 优化读写语言设置的逻辑 1 年之前
  liuaoran e7a1feb4f6 compdfkit(win) - 去重,补充水印弹窗文案 1 年之前
  weixiangjie 7854f9db18 compdfkit(win) - 初次启动写入语言配置 1 年之前
  liuaoran 82739a6069 compdfkit(win) - 移动水印 1 年之前
  weixiangjie cf4c00104d compdfkit(win) - Homepage点击功能打开对应内嵌文档 1 年之前
  weixiangjie b3e8dce30f compdfkit(win) - 首次启动根据系统设置语言,不支持该语言时设置为英文 1 年之前
  liuaoran 3fa2c49c6b compdfkit(win) - 切换页码范围时重新渲染 1 年之前
  weixiangjie c1d8b36f66 compdfkit(win) - 文案补充,生成文件时打开文件夹并选中 1 年之前
  weixiangjie a26531b91a compdfkit(win) - 文本复制鉴权 1 年之前
  liuaoran 904bf45a6a compdfkit(win) - 水印,设置自定义页面范围为1页时,重新打开范围选择后页面偶数页失效问题 1 年之前
  weixiangjie 1cb178c258 compdfkit(win) - 部分Bug修复 1 年之前
  liuaoran 453934356e compdfkit - 删除文档示例时的伪代码 1 年之前
  liuaoran 29423a80b3 compdfkit(win) - 重写文档时调整了samples一些顺序 1 年之前
  weixiangjie 4c708c781c compdfkit(win) - 补充页面编辑模块和遗漏部分文案翻译 1 年之前
  liuaoran 03b35f25a9 compdfkit(win) - 补充部分文案,修复mainpage bug 1 年之前
  liuaoran 6bba149911 compdf(win) - 安全文案 1 年之前
  weixiangjie 041613f590 compdfkit(win) - 菜单文案资源 1 年之前
  weixiangjie 5092ceb222 compdfkit(win) - bota,新建文件,Displlay部分文案 1 年之前
  liuaoran 85fa634846 compdfkit(win) - 修复了水印/密码损坏文档崩溃,修复了水印先设置自定义页面,再重新选择自定义页面后页码范围变为0开始,补充了水印页面范围水印和输入框居中 1 年之前
  weixiangjie 0c086200f9 compdfkit(win) - 文件信息文案资源 1 年之前
  weixiangjie ccf6c52b3c Merge remote-tracking branch 'origin/compdfkit_demo_win_dev' into compdfkit_demo_win_dev 1 年之前
  weixiangjie 633de2f721 compdfkit(win) - 部分文案资源 1 年之前
  liuaoran 11dfc60eb2 compdfkit(win) - Update watermark 1 年之前
  weixiangjie 2150e10abf compdfkit(win) - 整理部分文案资源 1 年之前
  liuaoran 32243f64a1 compdfkit(win) - rollback 1 年之前
  liuaoran 06219b719e compdfkit(win) - 截图更新前先提交一次,暂时移除SDK接入 1 年之前
  weixiangjie c841539c0c compdfkit(win) - 设计多语言方案 & 部分字体替换 1 年之前
  liuaoran 5d8eb46a27 compdfkit(win) - front back无效 1 年之前
  liuaoran b728eee6ec compdfkit(win) - 水印渲染调整 1 年之前
  weixiangjie bb8d680529 compdfkit(win) - 部分bug修复&导入导出xfdf 1 年之前
  weixiangjie 151ec9bbba compdfkit(win) - 应用注释作者 1 年之前
  liuaoran fb694a8f64 compdfkit(win) - license update 1 年之前
  weixiangjie 10bec3a9b6 compdfkit(win) - C# 语言改为 7.0 1 年之前
  weixiangjie 827255e9db compdfkit(win) - 新建PDF设置大小朝向窗口 1 年之前
  liuaoran 5e8e5df88c compdfkit(win) - 引用项目 1 年之前
  liuaoran c75b00d8b6 compdfkit(win) - feature list 默认文档迁移bug 1 年之前
  liuaoran 56d4bf29f6 compdfkit(win) - feature list 1 年之前
  liuaoran 30004c69f0 compdfkit(win) - lock homepage 1 年之前
  liuaoran 7304f812ab compdfkit(win) - 修复HomePage滚动问题 1 年之前
  liuaoran c2ec71a442 compdfkit(win) - 移除水印,补充批量操作时释放文档 1 年之前
  liuaoran 29d4e3a94a compdfkit(win) - 水印完整预览 1 年之前
  liuaoran b67f3b6784 compdfkit(win) - watermark 数据绑定 1 年之前
  weixiangjie 2e6e52b602 compdfkit(win) - 保存设置和重启app 1 年之前
  liuaoran 1a2e5bec67 compdfkit(win) - 水印界面 1 年之前
  weixiangjie 569fb676e1 compdfkit(win) - 保存settings和调整UI 1 年之前
  weixiangjie 2ed11dd041 compdfkit(win) - 修复Bota选中问题和右键菜单 1 年之前
  liuaoran 49de02d564 compdfkit(win) - drag 1 年之前
  liuaoran e9a6117bda compdfkit(win) - 预览更新 1 年之前
  weixiangjie 07738713eb compdfkit(win) - 添加文件时保存文件对象 1 年之前
  weixiangjie a0ad397446 compdfkit(win) - 新建文档另存为和打开文档逻辑 1 年之前
  liuaoran 09ce575c48 compdf(win) - 调整了窗口样式 1 年之前
  liuaoran 98e0e23918 compdfkit(win) - page range 1 年之前
  weixiangjie fe82c6fc17 compdfkit(win) - Home 按钮功能实现 1 年之前
  liuaoran c47902e0e4 compdfkit(win) - 补充Settings样式 1 年之前
  weixiangjie af00cb872d compdfkit(win) - Home 按钮UI 1 年之前
  weixiangjie 13717c4d95 compdfkit(win) - 历史记录 UI 1 年之前
  liuaoran 08e2646df9 compdfkit(win) - 优化了关闭文档的按钮交互 1 年之前
  liuaoran 363e74c3f9 compdfkit(win) - 优化了addfile按钮的外观和交互 1 年之前
  weixiangjie c8dbc50bbe compdfkit(win) - 更正移除密码按钮的enable绑定 1 年之前
  liuaoran e58cdf01e3 compdfkit(win) - HomePage自定义按钮 1 年之前
  liuaoran 6d2ce1cce2 compdfkit(win) - 粗略处理HomePageButton 1 年之前
  liuaoran ea23d748d2 compdfkit(win) - 水印列表 1 年之前
  weixiangjie 88f671b21c compdfkit(win) - 局部重构Bota,六合一数字签名 1 年之前
  liuaoran cd69e4e67d compdfkit(win) - 密码弹窗增加权限密码选项 1 年之前
  liuaoran 272f845f8d compdfkit(win) - 移动Security文件位置 1 年之前
  weixiangjie 9d2562d52f compdfkit(win) - 加密算法 1 年之前
  weixiangjie 1a2a842c2a compdfkit(win) - 优化绑定,添加进度条 1 年之前
  weixiangjie c13ceae1a0 compdfkit(win) - 移除密码 1 年之前
  weixiangjie 6e2ef7d9f8 compdfkit(win) - 优化密码窗口,加密文件再次加密的逻辑 1 年之前
  weixiangjie ed522eb9e2 compdfkit(win) - 批量移除和取消选中 1 年之前
  liuaoran eabd03200a compdfkit(win) - 历史文件记录持久化 1 年之前
  weixiangjie 1e37d47892 compdfkit(win) - 优化加密逻辑 1 年之前
  liyuxuan 24f7d4d827 compdfkit(win) - 更换PDFViewer支持多选库 1 年之前
  liyuxuan 49b36a0b59 compdfkit(win) - Demo 整合文字编辑多选 1 年之前
  liuaoran b6d91d3584 compdfkit(win) - 翻页的feature组件 1 年之前
  weixiangjie 921cc969a1 compdfkit(win) - 批量加密功能完善UI,实现加密 1 年之前
  weixiangjie c04adab145 compdfkit(win) - 密码框,批量加密功能UI 1 年之前
  liuaoran dad910ae7b compdfkit(win) - 恢复可关闭全部文档,创建homepage特殊页签 1 年之前
  liuaoran 9f2086d5cf compdfkit(win) - 补充homepage 初版 1 年之前
  weixiangjie b4ba1bf0ce compdfkit(win) - 补充 merge VB samples 1 年之前
  liuaoran b7f2b9f05f compdfkit(win) - VB samples 1 年之前
  weixiangjie 91d498d93f compdfkit(win) - VB部分测试用例 1 年之前
  liuaoran f491d3f743 compdfkit(win) - VB Samples - 注释导入导出 1 年之前
  liuaoran 2e7dafa3a5 compdfkit(win) - 调整了文件位置 1 年之前
  liuaoran ba0aa5be11 compdfkit(win) - vb 1 年之前
  liuaoran 0442b11a87 compdfkit(win) - vb 第一个程序 1 年之前
  liuaoran 7c52aa5473 compdfkit(win) - 调整Samples CS文件位置 1 年之前
共有 100 個文件被更改,包括 4792 次插入538 次删除
  1. 10 12
      Demo/Examples/Annotations/Annotations.csproj
  2. 9 9
      Demo/Examples/Annotations/App.xaml.cs
  3. 3 2
      Demo/Examples/Annotations/MainWindow.xaml
  4. 6 3
      Demo/Examples/Annotations/MainWindow.xaml.cs
  5. 3 3
      Demo/Examples/Annotations/Properties/AssemblyInfo.cs
  6. 15 15
      Demo/Examples/Compdfkit_Tools/Annotation/AnnotationControl.xaml.cs
  7. 1 7
      Demo/Examples/Compdfkit_Tools/Annotation/AnnotationControl/AnnotationControl.xaml
  8. 3 0
      Demo/Examples/Compdfkit_Tools/Annotation/AnnotationControl/AnnotationControl.xaml.cs
  9. 2 2
      Demo/Examples/Compdfkit_Tools/Annotation/CPDFAnnotationPreviewerControl.xaml
  10. 2 2
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationData/CPDFAnnotationData.cs
  11. 21 2
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationList/PDFAnnotationListControl/CPDFAnnotationListControl.xaml
  12. 34 0
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationList/PDFAnnotationListControl/CPDFAnnotationListControl.xaml.cs
  13. 6 5
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationList/PDFAnnotationListUI/CPDFAnnoationListUI.xaml
  14. 3 2
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationList/PDFAnnotationListUI/CPDFAnnoationListUI.xaml.cs
  15. 7 1
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml
  16. 13 13
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs
  17. 13 14
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateSignatureDialog.xaml
  18. 2 2
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateSignatureDialog.xaml.cs
  19. 13 13
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateStampDialog.xaml
  20. 10 4
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateStampDialog.xaml.cs
  21. 2 2
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFDeleteDialog.xaml
  22. 10 5
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFFreeTextUI.xaml
  23. 6 5
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFFreehandUI.xaml
  24. 8 7
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFLinkUI.xaml
  25. 3 3
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFLinkUI.xaml.cs
  26. 9 4
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFMarkupUI.xaml
  27. 5 4
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFMarkupUI.xaml.cs
  28. 8 3
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFNoteUI.xaml
  29. 17 8
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFShapeUI.xaml
  30. 6 4
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFShapeUI.xaml.cs
  31. 4 2
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFSignatureUI.xaml
  32. 3 1
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFSignatureUI.xaml.cs
  33. 8 6
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUI.xaml
  34. 3 3
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUI.xaml.cs
  35. 1 1
      Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFTempStampUI.xaml
  36. 33 4
      Demo/Examples/Compdfkit_Tools/Asset/Styles/ButtonStyle.xaml
  37. 159 21
      Demo/Examples/Compdfkit_Tools/Asset/Styles/ComboBoxStyle.xaml
  38. 32 0
      Demo/Examples/Compdfkit_Tools/Asset/Styles/EyeCheckBoxStyle.xaml
  39. 96 2
      Demo/Examples/Compdfkit_Tools/Asset/Styles/RadioButtonStyle.xaml
  40. 36 0
      Demo/Examples/Compdfkit_Tools/Asset/Styles/RoundCornerPasswordBoxStyle.xaml
  41. 42 0
      Demo/Examples/Compdfkit_Tools/Asset/Styles/RoundCornerTextBoxStyle.xaml
  42. 3 2
      Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFAnnotationBarControl.xaml.cs
  43. 169 172
      Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFBOTABarControl.xaml.cs
  44. 11 7
      Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFDigitalSignatureBarControl.xaml.cs
  45. 44 2
      Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFPageEditBarControl.xaml.cs
  46. 14 11
      Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFTitleBarControl.xaml
  47. 5 0
      Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFTitleBarControl.xaml.cs
  48. 34 30
      Demo/Examples/Compdfkit_Tools/Common/BarControl/FormBarControl.xaml.cs
  49. 30 0
      Demo/Examples/Compdfkit_Tools/Common/BaseControl/CustomProgressBarControl.xaml
  50. 59 0
      Demo/Examples/Compdfkit_Tools/Common/BaseControl/CustomProgressBarControl.xaml.cs
  51. 61 0
      Demo/Examples/Compdfkit_Tools/Common/BaseControl/HomePageButton.cs
  52. 43 0
      Demo/Examples/Compdfkit_Tools/Common/BaseControl/MatrixRadioControl.xaml
  53. 78 0
      Demo/Examples/Compdfkit_Tools/Common/BaseControl/MatrixRadioControl.xaml.cs
  54. 9 1
      Demo/Examples/Compdfkit_Tools/Common/BaseControl/NumericUpDownControl.xaml
  55. 29 3
      Demo/Examples/Compdfkit_Tools/Common/BaseControl/NumericUpDownControl.xaml.cs
  56. 25 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/AndMultiBoolValueConverter.cs
  57. 34 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/AntiBoolToVisibilityConverter.cs
  58. 34 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/AntiStringToVisibilityConverter.cs
  59. 41 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/BoolToColorConverter.cs
  60. 1 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/BoolToVisibilityConverter.cs
  61. 8 1
      Demo/Examples/Compdfkit_Tools/Common/Convert/CaptionHeightConverter.cs
  62. 28 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/HeightToTopMarginConverter.cs
  63. 31 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/HomePageFileListHeightConverter.cs
  64. 28 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/HomePageHeightConverter.cs
  65. 154 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/LanguageResourceConverter.cs
  66. 7 2
      Demo/Examples/Compdfkit_Tools/Common/Convert/ReverseBoolConverter.cs
  67. 26 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/ShowDefaultCloseButtonConverter.cs
  68. 26 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/ShowIconConverter.cs
  69. 35 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/StringToVisibilityConverter.cs
  70. 34 0
      Demo/Examples/Compdfkit_Tools/Common/Convert/TagToBoolConverter.cs
  71. 1 1
      Demo/Examples/Compdfkit_Tools/Common/Convert/WindowStateToThicknessConverter.cs
  72. 66 0
      Demo/Examples/Compdfkit_Tools/Common/CreateBlankPageSetting/CreateBlankPageSettingDialog.xaml
  73. 60 0
      Demo/Examples/Compdfkit_Tools/Common/CreateBlankPageSetting/CreateBlankPageSettingDialog.xaml.cs
  74. 216 79
      Demo/Examples/Compdfkit_Tools/Common/Helper/CommonHelper.cs
  75. 154 0
      Demo/Examples/Compdfkit_Tools/Common/Helper/FileHistoryHelper.cs
  76. 17 0
      Demo/Examples/Compdfkit_Tools/Common/Helper/LanguageHelper.cs
  77. 78 0
      Demo/Examples/Compdfkit_Tools/Common/Helper/PasswordHelper.cs
  78. 127 0
      Demo/Examples/Compdfkit_Tools/Common/HomePage/FeaturesListControl.xaml
  79. 262 0
      Demo/Examples/Compdfkit_Tools/Common/HomePage/FeaturesListControl.xaml.cs
  80. 100 0
      Demo/Examples/Compdfkit_Tools/Common/HomePage/HomePageControl.xaml
  81. 613 0
      Demo/Examples/Compdfkit_Tools/Common/HomePage/HomePageControl.xaml.cs
  82. 124 0
      Demo/Examples/Compdfkit_Tools/Common/HomePage/RecentFilesControl.xaml
  83. 46 0
      Demo/Examples/Compdfkit_Tools/Common/HomePage/RecentFilesControl.xaml.cs
  84. 44 0
      Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordBoxControl.xaml
  85. 97 0
      Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordBoxControl.xaml.cs
  86. 13 6
      Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordDialog.xaml
  87. 2 0
      Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordWindow.xaml
  88. 46 5
      Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordWindow.xaml.cs
  89. 97 0
      Demo/Examples/Compdfkit_Tools/Common/PreviewControl/PreviewControl.xaml
  90. 332 0
      Demo/Examples/Compdfkit_Tools/Common/PreviewControl/PreviewControl.xaml.cs
  91. 9 1
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/ColorPickerControl.xaml
  92. 11 11
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFArrow/CPDFArrowUI.xaml
  93. 12 8
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFFont/CPDFFontUI.xaml.cs
  94. 31 0
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFLocationControl.xaml
  95. 133 0
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFLocationControl.xaml.cs
  96. 51 0
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFRotationControl.xaml
  97. 103 0
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFRotationControl.xaml.cs
  98. 47 0
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFTileControl.xaml
  99. 132 0
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFTileControl.xaml.cs
  100. 0 0
      Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFOpacity/CPDFOpactiyUI.xaml

+ 10 - 12
Demo/Examples/Annotations/Annotations.csproj

@@ -93,18 +93,6 @@
     <None Include="App.config" />
     <None Include="packages.config" />
   </ItemGroup>
-  <ItemGroup>
-    <None Include="..\TestFile\PDF32000_2008.pdf">
-      <Link>PDF32000_2008.pdf</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
-  <ItemGroup>
-    <None Include="..\license_key_windows.xml">
-      <Link>license_key_windows.xml</Link>
-      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
-    </None>
-  </ItemGroup>
   <ItemGroup>
     <ProjectReference Include="..\Compdfkit_Tools\Compdfkit_Tools.csproj">
       <Project>{9363bcb1-3a67-446a-8093-5708b86bf418}</Project>
@@ -114,5 +102,15 @@
   <ItemGroup>
     <Resource Include="ComPDFKit_Logo.ico" />
   </ItemGroup>
+  <ItemGroup>
+    <None Include="..\license_key_windows.txt">
+      <Link>license_key_windows.txt</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </None>
+    <Content Include="..\TestFile\ComPDFKit_Annotations_Sample_File.pdf">
+      <Link>ComPDFKit_Annotations_Sample_File.pdf</Link>
+      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
   <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
 </Project>

+ 9 - 9
Demo/Examples/Annotations/App.xaml.cs

@@ -1,8 +1,12 @@
+using System.Globalization;
 using ComPDFKit.NativeMethod;
 using Compdfkit_Tools.Helper;
 using System.Reflection;
+using System.Threading;
 using System.Windows;
 using System.Xml;
+using static ComPDFKit.NativeMethod.CPDFSDKVerifier;
+
 
 namespace AnnotationViewControl
 {
@@ -16,21 +20,17 @@ namespace AnnotationViewControl
             string str = this.GetType().Assembly.Location;
             base.OnStartup(e);
             LicenseVerify();
+            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
+            Thread.CurrentThread.CurrentCulture = new CultureInfo("en-US");
         }
 
         private static bool LicenseVerify()
         {
-            bool result = false;
-
-            result = CPDFSDKVerifier.LoadNativeLibrary();
-            if (!result)
+            if (!LoadNativeLibrary())
                 return false;
-            SDKLicenseHelper sdkLicenseHelper = new SDKLicenseHelper();
 
-            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify(sdkLicenseHelper.key, sdkLicenseHelper.secret);
-            if (verifyResult != LicenseErrorCode.LICENSE_ERR_SUCCESS)
-                return false;
-            return result;
+            LicenseErrorCode verifyResult = CPDFSDKVerifier.LicenseVerify("license_key_windows.txt", true);
+            return (verifyResult == LicenseErrorCode.E_LICENSE_SUCCESS);
         }
     }
 }

+ 3 - 2
Demo/Examples/Annotations/MainWindow.xaml

@@ -8,7 +8,7 @@
         xmlns:common="clr-namespace:Compdfkit_Tools.Common;assembly=ComPDFKit_Tools"
         mc:Ignorable="d"
         Loaded="MainWindow_Loaded"
-        Title="Annotations_ComPDFKit V1.10.0" Height="720" Width="1080"  WindowStartupLocation="CenterScreen">
+        Title="Annotations_ComPDFKit V1.11.0" Height="720" Width="1080"  WindowStartupLocation="CenterScreen">
     <Window.Resources>
         <ResourceDictionary>
             <ResourceDictionary.MergedDictionaries>
@@ -16,6 +16,7 @@
                 <ResourceDictionary Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
                 <ResourceDictionary Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
+            <common:DocInfoResourceConverter x:Key="DocInfoResourceConverter"></common:DocInfoResourceConverter>
         </ResourceDictionary>
     </Window.Resources>
     <Grid>
@@ -250,7 +251,7 @@
                         <RowDefinition Height="*"></RowDefinition>
                     </Grid.RowDefinitions>
 
-                    <TextBlock Width="50" Height="20" FontSize="14" LineHeight="16" Margin="12,6,0,0" HorizontalAlignment="Left">FileInfo:</TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource DocInfoResourceConverter},ConverterParameter=Title_DocInfo}" Height="20" FontSize="14" LineHeight="16" Margin="12,6,0,0" HorizontalAlignment="Left"></TextBlock>
                     <Button Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Right" Margin="0,8,8,0" BorderThickness="0" Click="FileInfoCloseBtn_Click">
                         <Button.Content>
                             <Path Fill="Black">

+ 6 - 3
Demo/Examples/Annotations/MainWindow.xaml.cs

@@ -11,8 +11,10 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Diagnostics;
 using System.Drawing;
+using System.Globalization;
 using System.IO;
 using System.Runtime.CompilerServices;
+using System.Threading;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Controls.Primitives;
@@ -35,7 +37,7 @@ namespace AnnotationViewControl
         private PDFViewControl pdfViewer;
         private PDFViewControl passwordViewer;
         private AnnotationControl annotationControl = new AnnotationControl();
-        private CPDFBOTABarControl botaBarControl = new CPDFBOTABarControl(BOTATools.Thumbnail | BOTATools.Outline | BOTATools.Bookmark | BOTATools.Search | BOTATools.Annotation);
+        private CPDFBOTABarControl botaBarControl = new CPDFBOTABarControl();
         private PanelState panelState = PanelState.GetInstance();
         
         private bool _canSave = false;
@@ -97,7 +99,7 @@ namespace AnnotationViewControl
 
         private void LoadDefaultDocument()
         {
-            string defaultFilePath = "PDF32000_2008.pdf";
+            string defaultFilePath = "ComPDFKit_Annotations_Sample_File.pdf";
             pdfViewer.PDFView.InitDocument(defaultFilePath);
             LoadDocument();
         }
@@ -135,6 +137,7 @@ namespace AnnotationViewControl
 
             ViewSettingBtn.IsChecked = false;
             botaBarControl.InitWithPDFViewer(annotationControl.PDFViewControl.PDFView);
+            botaBarControl.AddBOTAContent(new []{BOTATools.Thumbnail , BOTATools.Outline , BOTATools.Bookmark , BOTATools.Annotation , BOTATools.Search});
             botaBarControl.SelectBotaTool(BOTATools.Thumbnail);
             annotationControl.SetBOTAContainer(botaBarControl);
             annotationControl.InitialPDFViewControl(annotationControl.PDFViewControl);
@@ -167,7 +170,7 @@ namespace AnnotationViewControl
 
                 if (passwordViewer.PDFView.Document.IsLocked)
                 {
-                    PasswordUI.SetShowText(System.IO.Path.GetFileName(filePath) + " password encrypted.");
+                    PasswordUI.SetShowText(System.IO.Path.GetFileName(filePath) + " " + LanguageHelper.CommonManager.GetString("Tip_Encrypted"));
                     PasswordUI.ClearPassword();
                     PopupBorder.Visibility = Visibility.Visible;
                     PasswordUI.Visibility = Visibility.Visible;

+ 3 - 3
Demo/Examples/Annotations/Properties/AssemblyInfo.cs

@@ -10,7 +10,7 @@ using System.Windows;
 [assembly: AssemblyTitle("Annotations_ComPDFKit")]
 [assembly: AssemblyDescription("")]
 [assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("PDF Tecnologies, Inc.")]
+[assembly: AssemblyCompany("PDF Technologies, Inc.")]
 [assembly: AssemblyProduct("Annotations_ComPDFKit")]
 [assembly: AssemblyCopyright("Copyright © 2014-2023 PDF Technologies, Inc. All Rights Reserved.")]
 [assembly: AssemblyTrademark("")]
@@ -51,5 +51,5 @@ using System.Windows;
 // You can specify all the values or you can default the Build and Revision Numbers
 // by using the '*' as shown below:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.10.0.0")]
-[assembly: AssemblyFileVersion("1.10.0.0")]
+[assembly: AssemblyVersion("1.11.0.0")]
+[assembly: AssemblyFileVersion("1.11.0.0")]

+ 15 - 15
Demo/Examples/Compdfkit_Tools/Annotation/AnnotationControl.xaml.cs

@@ -192,7 +192,7 @@ namespace Compdfkit_Tools.PDFControl
                         e.PopupMenu = new ContextMenu();
                         if (e.PressOnLink && AnnotationBarControl.CurrentMode == "Link")
                         {
-                            e.PopupMenu.Items.Add(new MenuItem() { Header = "Delete", Command = ApplicationCommands.Delete, CommandTarget = (UIElement)sender });
+                            e.PopupMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Delete"), Command = ApplicationCommands.Delete, CommandTarget = (UIElement)sender });
                             MenuItem propertyMenu = new MenuItem();
                             propertyMenu = new MenuItem();
                             propertyMenu.Header = "Edit";
@@ -202,19 +202,19 @@ namespace Compdfkit_Tools.PDFControl
                         }
                         else if (e.PressOnAnnot)
                         {
-                            e.PopupMenu.Items.Add(new MenuItem() { Header = "Delete", Command = ApplicationCommands.Delete, CommandTarget = (UIElement)sender });
-                            e.PopupMenu.Items.Add(new MenuItem() { Header = "Copy", Command = ApplicationCommands.Copy, CommandTarget = (UIElement)sender });
-                            e.PopupMenu.Items.Add(new MenuItem() { Header = "Cut", Command = ApplicationCommands.Cut, CommandTarget = (UIElement)sender });
+                            e.PopupMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Delete"), Command = ApplicationCommands.Delete, CommandTarget = (UIElement)sender });
+                            e.PopupMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Copy"), Command = ApplicationCommands.Copy, CommandTarget = (UIElement)sender });
+                            e.PopupMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Cut"), Command = ApplicationCommands.Cut, CommandTarget = (UIElement)sender });
                         }
                         else if (e.PressOnMedia || e.PressOnSound)
                         {
                             e.Handle = true;
                             e.PopupMenu.Items.Add(new MenuItem() { Header = "Play", Command = MediaCommands.Play, CommandTarget = (UIElement)sender, CommandParameter = e });
-                            e.PopupMenu.Items.Add(new MenuItem() { Header = "Delete", Command = ApplicationCommands.Delete, CommandTarget = (UIElement)sender });
+                            e.PopupMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Delete"), Command = ApplicationCommands.Delete, CommandTarget = (UIElement)sender });
                         }
                         else if (e.PressOnSelectedText)
                         {
-                            e.PopupMenu.Items.Add(new MenuItem() { Header = "Copy", Command = ApplicationCommands.Copy, CommandTarget = (UIElement)sender });
+                            e.PopupMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Copy"), Command = ApplicationCommands.Copy, CommandTarget = (UIElement)sender });
                             MenuItem highLightMenu = new MenuItem();
                             highLightMenu.Header = "HighLight";
                             highLightMenu.Click += (o, p) =>
@@ -297,11 +297,11 @@ namespace Compdfkit_Tools.PDFControl
                             e.Handle = true;
                             e.PopupMenu = new ContextMenu();
 
-                            e.PopupMenu.Items.Add(new MenuItem() { Header = "Paste", Command = ApplicationCommands.Paste, CommandTarget = (UIElement)sender });
+                            e.PopupMenu.Items.Add(new MenuItem() { Header = LanguageHelper.CommonManager.GetString("Menu_Paste"), Command = ApplicationCommands.Paste, CommandTarget = (UIElement)sender });
                             e.PopupMenu.Items.Add(new Separator());
 
                             MenuItem fitWidthMenu = new MenuItem();
-                            fitWidthMenu.Header = "Automatically Resize";
+                            fitWidthMenu.Header = LanguageHelper.CommonManager.GetString("Menu_AutoSize");
                             fitWidthMenu.Click += (o, p) =>
                             {
                                 if (PDFViewControl != null)
@@ -313,7 +313,7 @@ namespace Compdfkit_Tools.PDFControl
                             e.PopupMenu.Items.Add(fitWidthMenu);
 
                             MenuItem fitSizeMenu = new MenuItem();
-                            fitSizeMenu.Header = "Actual Size";
+                            fitWidthMenu.Header = LanguageHelper.CommonManager.GetString("Menu_RealSize");
                             fitSizeMenu.Click += (o, p) =>
                             {
                                 if (PDFViewControl != null)
@@ -325,7 +325,7 @@ namespace Compdfkit_Tools.PDFControl
                             e.PopupMenu.Items.Add(fitSizeMenu);
 
                             MenuItem zoomInMenu = new MenuItem();
-                            zoomInMenu.Header = "Zoom In";
+                            zoomInMenu.Header = LanguageHelper.CommonManager.GetString("Menu_ZoomIn");
                             zoomInMenu.Click += (o, p) =>
                             {
                                 if (PDFViewControl != null)
@@ -338,7 +338,7 @@ namespace Compdfkit_Tools.PDFControl
                             e.PopupMenu.Items.Add(zoomInMenu);
 
                             MenuItem zoomOutMenu = new MenuItem();
-                            zoomOutMenu.Header = "Zoom Out";
+                            zoomInMenu.Header = LanguageHelper.CommonManager.GetString("Menu_ZoomOut");
                             zoomOutMenu.Click += (o, p) =>
                             {
                                 if (PDFViewControl != null)
@@ -352,7 +352,7 @@ namespace Compdfkit_Tools.PDFControl
                             e.PopupMenu.Items.Add(new Separator());
 
                             MenuItem singleView = new MenuItem();
-                            singleView.Header = "Single Page";
+                            singleView.Header = LanguageHelper.CommonManager.GetString("Menu_SinglePage");
                             singleView.Click += (o, p) =>
                             {
                                 if (PDFViewControl != null)
@@ -364,7 +364,7 @@ namespace Compdfkit_Tools.PDFControl
                             e.PopupMenu.Items.Add(singleView);
 
                             MenuItem singleContinuousView = new MenuItem();
-                            singleContinuousView.Header = "Single Page Continuous";
+                            singleContinuousView.Header = LanguageHelper.CommonManager.GetString("Menu_SingleContinuous");
                             singleContinuousView.Click += (o, p) =>
                             {
                                 if (PDFViewControl != null)
@@ -376,7 +376,7 @@ namespace Compdfkit_Tools.PDFControl
                             e.PopupMenu.Items.Add(singleContinuousView);
 
                             MenuItem doubleView = new MenuItem();
-                            doubleView.Header = "Two Pages";
+                            doubleView.Header = LanguageHelper.CommonManager.GetString("Menu_DoublePage");
                             doubleView.Click += (o, p) =>
                             {
                                 if (PDFViewControl != null)
@@ -388,7 +388,7 @@ namespace Compdfkit_Tools.PDFControl
                             e.PopupMenu.Items.Add(doubleView);
 
                             MenuItem doubleContinuousView = new MenuItem();
-                            doubleContinuousView.Header = "Two Pages Continuous";
+                            doubleContinuousView.Header = LanguageHelper.CommonManager.GetString("Menu_DoubleContinuous");
                             doubleContinuousView.Click += (o, p) =>
                             {
                                 if (PDFViewControl != null)

+ 1 - 7
Demo/Examples/Compdfkit_Tools/Annotation/AnnotationControl/AnnotationControl.xaml

@@ -81,11 +81,8 @@
                                 5.30443 12.4079 3.40164 10.0607 3.40164H3.37132L5.7123 1.06066L4.65164 0L1.03033 3.62131Z
                         </Path.Data>
                     </Path>
-                    <Button.ToolTip>
-                        <ToolTip Content="Undo"></ToolTip>
-                    </Button.ToolTip>
                 </Button>
-                <Button Style="{StaticResource LightButtonStyle}" BorderThickness="0" Width="40" Height="40" Margin="10,0,0,0"  IsEnabled="{Binding CanRedo,Mode=OneWay}" Click="RedoButton_Click"
+                <Button x:Name="RedoBtn" Style="{StaticResource LightButtonStyle}" BorderThickness="0" Width="40" Height="40" Margin="10,0,0,0"  IsEnabled="{Binding CanRedo,Mode=OneWay}" Click="RedoButton_Click"
                                     Background="Transparent">
                     <Path IsEnabled="{Binding CanRedo,Mode=OneWay}">
                         <Path.Resources>
@@ -106,9 +103,6 @@
                                 7.65164C0.499887 5.30443 2.40268 3.40164 4.74989 3.40164H11.4392L9.09825 1.06066L10.1589 0L13.7802 3.62131Z
                         </Path.Data>
                     </Path>
-                    <Button.ToolTip>
-                        <ToolTip Content="Redo"></ToolTip>
-                    </Button.ToolTip>
                 </Button>
             </StackPanel>
         </Border>

+ 3 - 0
Demo/Examples/Compdfkit_Tools/Annotation/AnnotationControl/AnnotationControl.xaml.cs

@@ -101,6 +101,9 @@ namespace Compdfkit_Tools.PDFControl
             AnnotationBarControl.InitAnnotationBar(annotationProperties);
             panelState.PropertyChanged -= PanelState_PropertyChanged;
             panelState.PropertyChanged += PanelState_PropertyChanged;
+
+            UndoBtn.ToolTip = LanguageHelper.CommonManager.GetString("Tooltip_Undo");
+            RedoBtn.ToolTip = LanguageHelper.CommonManager.GetString("Tooltip_Redo");
         }
 
         #region Init PDFViewer

+ 2 - 2
Demo/Examples/Compdfkit_Tools/Annotation/CPDFAnnotationPreviewerControl.xaml

@@ -11,7 +11,7 @@
     <Border BorderBrush="#E2E3E6" BorderThickness="1" Background="#FFFFFF">
         <Grid>
             <Grid x:Name="MarkupGrid" VerticalAlignment="Center" Visibility="Collapsed">
-                <TextBlock Name="SampleText" Text="Sample" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" FontFamily="Segoe UI" FontSize="20"></TextBlock>
+                <TextBlock Name="SampleText" Text="Sample" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" FontFamily="Microsoft YaHei" FontSize="20"></TextBlock>
                 
                 <Path x:Name="HighlightPath" HorizontalAlignment="Center" VerticalAlignment="Bottom" Stroke="Green" StrokeThickness="25" Visibility="Collapsed" Panel.ZIndex="-1">
                     <Path.Data>
@@ -56,7 +56,7 @@
             </Grid>
             
             <Grid x:Name="FreeTextGrid" Visibility="Collapsed">
-                <TextBlock Name="FreeText" Text="Sample" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" FontFamily="Segoe UI" FontSize="20"></TextBlock>
+                <TextBlock Name="FreeText" Text="Sample" HorizontalAlignment="Center" VerticalAlignment="Center" FontWeight="Bold" FontFamily="Microsoft YaHei" FontSize="20"></TextBlock>
             </Grid>
             
             <Grid x:Name="ShapeGrid" Visibility="Collapsed">

+ 2 - 2
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationData/CPDFAnnotationData.cs

@@ -9,7 +9,7 @@ namespace Compdfkit_Tools.Data
 {
     public enum CPDFAnnotationType
     {
-        Unknow = 0,
+        Unknown = 0,
         Highlight,
         Underline,
         Strikeout,
@@ -144,7 +144,7 @@ namespace Compdfkit_Tools.Data
     {
         public CPDFAnnotationType AnnotationType;
         public string Note = string.Empty;
-        public string Author = "ComPDFKit";
+        public static string Author;
         public bool IsLocked = false;
     }
 

File diff suppressed because it is too large
+ 21 - 2
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationList/PDFAnnotationListControl/CPDFAnnotationListControl.xaml


+ 34 - 0
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationList/PDFAnnotationListControl/CPDFAnnotationListControl.xaml.cs

@@ -7,9 +7,11 @@ using ComPDFKitViewer;
 using ComPDFKitViewer.BaseObject;
 using System.Collections.Generic;
 using System.Linq;
+using System.IO;
 using System.Windows;
 using System.Windows.Annotations;
 using System.Windows.Controls;
+using Compdfkit_Tools.Helper;
 using static Compdfkit_Tools.PDFControlUI.CPDFAnnoationListUI;
 
 namespace Compdfkit_Tools.PDFControl
@@ -164,5 +166,37 @@ namespace Compdfkit_Tools.PDFControl
             pdfViewer.PDFViewTool.GetCPDFViewer().UpDateRenderFrame();
             pdfViewer.PDFViewTool.SelectedAnnotForIndex(bindAnnotationResult.PageIndex, bindAnnotationResult.AnnotIndex);
         }
+
+        private void ImportBtn_Click(object sender, RoutedEventArgs e)
+        {
+            var selectedPath = Helper.CommonHelper.GetExistedPathOrEmpty("XFDF Files (*.xfdf)|*.xfdf");
+            if (string.IsNullOrEmpty(selectedPath)) return;
+            var tempPath = Path.Combine(Path.GetDirectoryName(selectedPath), "temp");
+            if (!Directory.Exists(tempPath))
+            {
+                Directory.CreateDirectory(tempPath);
+            }
+            pdfViewer.PDFToolManager.GetDocument().ImportAnnotationFromXFDFPath(selectedPath,tempPath);
+                
+            LoadAnnotationList();
+            pdfViewer.PDFViewTool.GetCPDFViewer().UpdateVirtualNodes();
+            //pdfViewer.UndoManager.CanSave = true;
+        }
+
+        private void ExportBtn_Click(object sender, RoutedEventArgs e)
+        {
+            var selectedPath = Helper.CommonHelper.GetGeneratePathOrEmpty("XFDF Files (*.xfdf)|*.xfdf", pdfViewer.PDFToolManager.GetDocument().FileName);
+            if (string.IsNullOrEmpty(selectedPath)) return;
+            var tempPath = Path.Combine(Path.GetDirectoryName(selectedPath), "temp");
+            if (!Directory.Exists(tempPath))
+            {
+                Directory.CreateDirectory(tempPath);
+            }
+
+            if (pdfViewer.PDFToolManager.GetDocument().ExportAnnotationToXFDFPath(selectedPath, tempPath))
+            {
+                System.Diagnostics.Process.Start("explorer.exe", "/select," + selectedPath);
+            }
+        }
     }
 }

+ 6 - 5
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationList/PDFAnnotationListUI/CPDFAnnoationListUI.xaml

@@ -8,6 +8,7 @@
               d:DesignHeight="800" d:DesignWidth="300">
     <UserControl.Resources>
         <cpdfcommon:AnnotArgsTypeToVisibilityConverter x:Key="AnnotArgsTypeToVisibilityConverter"></cpdfcommon:AnnotArgsTypeToVisibilityConverter>
+        <cpdfcommon:BotaResourceConverter x:Key="BotaResourceConverter"></cpdfcommon:BotaResourceConverter>
     </UserControl.Resources>
     <Grid>
         <ListView Name="AnnotationList" SelectionChanged="AnnotationListControl_SelectionChanged" VirtualizingPanel.IsVirtualizingWhenGrouping="True" 
@@ -21,12 +22,12 @@
                             <Grid>
                                 <StackPanel Height="32" Orientation="Horizontal" Background="#F2F2F2">
                                     <TextBlock VerticalAlignment="Center" TextAlignment="Center"
-                                           FontWeight="SemiBold" FontSize="12" Text="Page" FontFamily="Segoe UI" Foreground="#43474D"  Margin="16,6,0,6"/>
+                                           FontWeight="SemiBold" FontSize="12" Text="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Text_Page}" FontFamily="Microsoft YaHei" Foreground="#43474D"  Margin="16,6,0,6"/>
                                     <TextBlock VerticalAlignment="Center" TextAlignment="Center"
-                                           FontWeight="SemiBold" FontSize="12" Text="{Binding Name}" FontFamily="Segoe UI" Foreground="#43474D" Margin="0,6"/>
+                                           FontWeight="SemiBold" FontSize="12" Text="{Binding Name}" FontFamily="Microsoft YaHei" Foreground="#43474D" Margin="0,6"/>
                                 </StackPanel>
                                 <TextBlock VerticalAlignment="Center" TextAlignment="Center" HorizontalAlignment="Right"  
-                                           FontWeight="SemiBold" FontSize="12" Text="{Binding Items.Count}" FontFamily="Segoe UI" Foreground="#43474D" Margin="0,0,40,0"/>
+                                           FontWeight="SemiBold" FontSize="12" Text="{Binding Items.Count}" FontFamily="Microsoft YaHei" Foreground="#43474D" Margin="0,0,40,0"/>
                             </Grid>
                         </DataTemplate>
                     </GroupStyle.HeaderTemplate>
@@ -102,13 +103,13 @@
                             </Canvas>
                             <TextBlock Text="{Binding BindProperty.CreateDate}" Grid.Column="1" Margin="10,0,0,0"></TextBlock>
                         </Grid>
-                        <TextBox Text="{Binding BindProperty.Note, Mode=OneWay}"  Grid.Row="1" TextWrapping="Wrap" AcceptsReturn="True" IsHitTestVisible="False" Background="Transparent" BorderThickness="0" Width="{Binding ElementName=AnnotationList,Path=ActualWidth}" Padding="16,6,16,6" FontFamily="Segoe UI" FontSize="14px"></TextBox>
+                        <TextBox Text="{Binding BindProperty.Note, Mode=OneWay}"  Grid.Row="1" TextWrapping="Wrap" AcceptsReturn="True" IsHitTestVisible="False" Background="Transparent" BorderThickness="0" Width="{Binding ElementName=AnnotationList,Path=ActualWidth}" Padding="16,6,16,6" FontFamily="Microsoft YaHei" FontSize="14px"></TextBox>
                     </Grid>
                 </ItemContainerTemplate>
             </ListView.ItemTemplate>
         </ListView>
 
-        <TextBlock Name="NoContentText" Text="No Annotation" Visibility="Visible" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
+        <TextBlock Name="NoContentText" Text="{Binding Converter={StaticResource BotaResourceConverter},ConverterParameter=Text_NoAnnotations}" Visibility="Visible" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
 
     </Grid>
 </UserControl>

+ 3 - 2
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationList/PDFAnnotationListUI/CPDFAnnoationListUI.xaml.cs

@@ -9,6 +9,7 @@ using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Data;
 using System.Windows.Input;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.PDFControlUI
 {
@@ -82,12 +83,12 @@ namespace Compdfkit_Tools.PDFControlUI
             groupView.GroupDescriptions.Add(new PropertyGroupDescription(nameof(AnnotationBindData.ShowPageIndex)));
             popContextMenu = new ContextMenu();
             MenuItem deleteMenu = new MenuItem();
-            deleteMenu.Header = "Delete";
+            deleteMenu.Header = LanguageHelper.BotaManager.GetString("Menu_Delete");
             deleteMenu.Click -= DeleteMenu_Click;
             deleteMenu.Click += DeleteMenu_Click;
             popContextMenu.Items.Add(deleteMenu);
             MenuItem deleteAllMenu = new MenuItem();
-            deleteAllMenu.Header = "Delete All";
+            deleteAllMenu.Header = LanguageHelper.BotaManager.GetString("Menu_DeleteAll");
             deleteAllMenu.Click -= DeleteAllMenu_Click;
             deleteAllMenu.Click += DeleteAllMenu_Click;
             popContextMenu.Items.Add(deleteAllMenu);

+ 7 - 1
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml

@@ -4,12 +4,18 @@
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:Compdfkit_Tools.PDFControlUI"
+             xmlns:common="clr-namespace:Compdfkit_Tools.Common"
              mc:Ignorable="d" 
              Loaded="AnnotationControl_Loaded"
              Unloaded="AnnotationControl_Unloaded"
              d:DesignHeight="800" d:DesignWidth="300">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <common:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></common:PropertyPanelResourceConverter>
+        </ResourceDictionary>
+    </UserControl.Resources>
     <Grid>
         <Border x:Name="AnnotationPanelContainer" Background="#FAFCFF"></Border>
-        <TextBlock x:Name="EmptyMessage" Text="The property panel is empty." VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
+        <TextBlock x:Name="EmptyMessage" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Text_EmptyPanel}" VerticalAlignment="Center" HorizontalAlignment="Center"></TextBlock>
     </Grid>
 </UserControl>

+ 13 - 13
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationControl/CPDFAnnotationControl.xaml.cs

@@ -33,7 +33,7 @@ namespace Compdfkit_Tools.PDFControl
 
         private bool isTempPanel = false;
 
-        private CPDFAnnotationType currentAnnotationType = CPDFAnnotationType.Unknow;
+        private CPDFAnnotationType currentAnnotationType = CPDFAnnotationType.Unknown;
 
         private PDFViewControl pdfViewerControl;
 
@@ -253,7 +253,7 @@ namespace Compdfkit_Tools.PDFControl
                         (annotHandlerEventArgs as HighlightParam).HighlightColor = Color;
                         (annotHandlerEventArgs as HighlightParam).Transparency = Convert.ToByte(highlightData.Opacity * 255);
                         (annotHandlerEventArgs as HighlightParam).Content = highlightData.Note;
-                        (annotHandlerEventArgs as HighlightParam).Author = highlightData.Author;
+                        (annotHandlerEventArgs as HighlightParam).Author = CPDFMarkupData.Author;
                         (annotHandlerEventArgs as HighlightParam).Locked = highlightData.IsLocked;
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_HIGHLIGHT);
                     }
@@ -267,7 +267,7 @@ namespace Compdfkit_Tools.PDFControl
                         annotHandlerEventArgs.CurrentType = C_ANNOTATION_TYPE.C_ANNOTATION_UNDERLINE;
                         (annotHandlerEventArgs as UnderlineParam).UnderlineColor = Color;
                         (annotHandlerEventArgs as UnderlineParam).Transparency = Convert.ToByte(underlineData.Opacity * 255);
-                        (annotHandlerEventArgs as UnderlineParam).Author = underlineData.Author;
+                        (annotHandlerEventArgs as UnderlineParam).Author = CPDFMarkupData.Author;
                         (annotHandlerEventArgs as UnderlineParam).Content = underlineData.Note;
                         (annotHandlerEventArgs as UnderlineParam).Locked = underlineData.IsLocked;
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_UNDERLINE);
@@ -283,7 +283,7 @@ namespace Compdfkit_Tools.PDFControl
                         (annotHandlerEventArgs as StrikeoutParam).StrikeoutColor = Color;
                         (annotHandlerEventArgs as StrikeoutParam).Transparency = Convert.ToByte(strikeoutData.Opacity * 255);
                         (annotHandlerEventArgs as StrikeoutParam).Locked = strikeoutData.IsLocked;
-                        (annotHandlerEventArgs as StrikeoutParam).Author = strikeoutData.Author;
+                        (annotHandlerEventArgs as StrikeoutParam).Author = CPDFMarkupData.Author;
                         (annotHandlerEventArgs as StrikeoutParam).Content = strikeoutData.Note;
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_STRIKEOUT);
                     }
@@ -298,7 +298,7 @@ namespace Compdfkit_Tools.PDFControl
                         (annotHandlerEventArgs as SquigglyParam).SquigglyColor = Color;
                         (annotHandlerEventArgs as SquigglyParam).Transparency = Convert.ToByte(squigglyData.Opacity * 255);
                         (annotHandlerEventArgs as SquigglyParam).Locked = squigglyData.IsLocked;
-                        (annotHandlerEventArgs as SquigglyParam).Author = squigglyData.Author;
+                        (annotHandlerEventArgs as SquigglyParam).Author = CPDFMarkupData.Author;
                         (annotHandlerEventArgs as SquigglyParam).Content = squigglyData.Note;
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_SQUIGGLY);
                     }
@@ -323,7 +323,7 @@ namespace Compdfkit_Tools.PDFControl
                         (annotHandlerEventArgs as SquareParam).LineDash = LineDash;
                         (annotHandlerEventArgs as SquareParam).BorderStyle = BorderStyle;
 
-                        (annotHandlerEventArgs as SquareParam).Author = squareData.Author;
+                        (annotHandlerEventArgs as SquareParam).Author = CPDFMarkupData.Author;
                         (annotHandlerEventArgs as SquareParam).Content = squareData.Note;
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_SQUARE);
                     }
@@ -347,7 +347,7 @@ namespace Compdfkit_Tools.PDFControl
                         ParamConverter.ParseDashStyle(cicleData.DashStyle, out float[] LineDash, out C_BORDER_STYLE BorderStyle);
                         (annotHandlerEventArgs as CircleParam).LineDash = LineDash;
                         (annotHandlerEventArgs as CircleParam).BorderStyle = BorderStyle;
-                        (annotHandlerEventArgs as CircleParam).Author = cicleData.Author;
+                        (annotHandlerEventArgs as CircleParam).Author = CPDFMarkupData.Author;
                         (annotHandlerEventArgs as CircleParam).Content = cicleData.Note;
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_CIRCLE);
                     }
@@ -368,7 +368,7 @@ namespace Compdfkit_Tools.PDFControl
                         (annotHandlerEventArgs as LineParam).BorderStyle = BorderStyle;
                         (annotHandlerEventArgs as LineParam).HeadLineType = lineData.LineType.HeadLineType;
                         (annotHandlerEventArgs as LineParam).TailLineType = lineData.LineType.TailLineType;
-                        (annotHandlerEventArgs as LineParam).Author = lineData.Author;
+                        (annotHandlerEventArgs as LineParam).Author = CPDFMarkupData.Author;
                         (annotHandlerEventArgs as LineParam).Content = lineData.Note;
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_LINE);
                     }
@@ -383,7 +383,7 @@ namespace Compdfkit_Tools.PDFControl
                         (annotHandlerEventArgs as StickyNoteParam).StickyNoteColor = StickyNoteColor;
                         (annotHandlerEventArgs as StickyNoteParam).Content = noteData.Note;
                         (annotHandlerEventArgs as StickyNoteParam).Transparency = 255;
-                        (annotHandlerEventArgs as StickyNoteParam).Author = noteData.Author;
+                        (annotHandlerEventArgs as StickyNoteParam).Author = CPDFMarkupData.Author;
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_TEXT);
                     }
                     break;
@@ -398,7 +398,7 @@ namespace Compdfkit_Tools.PDFControl
                         (annotHandlerEventArgs as InkParam).Thickness = freehandData.Thickness;
                         (annotHandlerEventArgs as InkParam).Transparency = Convert.ToByte(freehandData.Opacity * 255);
                         (annotHandlerEventArgs as InkParam).Content = freehandData.Note;
-                        (annotHandlerEventArgs as InkParam).Author = freehandData.Author;
+                        (annotHandlerEventArgs as InkParam).Author = CPDFMarkupData.Author;
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_INK);
                     }
                     break;
@@ -431,7 +431,7 @@ namespace Compdfkit_Tools.PDFControl
                                 break;
                         }
                         (annotHandlerEventArgs as FreeTextParam).Content = freeTextData.Note;
-                        (annotHandlerEventArgs as FreeTextParam).Author = freeTextData.Author;
+                        (annotHandlerEventArgs as FreeTextParam).Author = CPDFMarkupData.Author;
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_FREETEXT);
                     }
                     break;
@@ -542,7 +542,7 @@ namespace Compdfkit_Tools.PDFControl
                         pdfViewerControl.SetCreateAnnotType(C_ANNOTATION_TYPE.C_ANNOTATION_LINK);
                     }
                     break;
-                case CPDFAnnotationType.Unknow:
+                case CPDFAnnotationType.Unknown:
                     pdfViewerControl.SetToolType(ToolType.Pan);
                     return;
                 default:
@@ -749,7 +749,7 @@ namespace Compdfkit_Tools.PDFControl
         private void SetStamp(ref StampParam stampParam, CPDFStampData stamp)
         {
             stampParam.StampText = stamp.StampText;
-            stampParam.Author = stamp.Author;
+            stampParam.Author = CPDFMarkupData.Author;
             stampParam.Transparency = Convert.ToByte(stamp.Opacity * 255);
             stampParam.DateText = stamp.StampTextDate;
             stampParam.TextStampColor = stamp.TextColor;

+ 13 - 14
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateSignatureDialog.xaml

@@ -3,7 +3,6 @@
         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
-        xmlns:local="clr-namespace:Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI"
         xmlns:convert="clr-namespace:Compdfkit_Tools.Common" 
         xmlns:common="clr-namespace:Compdfkit_Tools.Common"
         mc:Ignorable="d"
@@ -17,6 +16,7 @@
                 <ResourceDictionary Source="../../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
                 <ResourceDictionary Source="../../../Asset/Styles/ComboBoxStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
+            <convert:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></convert:PropertyPanelResourceConverter>
             <convert:ReverseVisibilityConverter x:Key="ReverseVisibilityConverter"/>
             <SolidColorBrush x:Key="TabItem.Selected.Background" Color="#FFFFFF"/>
             <SolidColorBrush x:Key="TabItem.Selected.Border" Color="#ACACAC"/>
@@ -332,7 +332,7 @@
             <RowDefinition Height="11"/>
         </Grid.RowDefinitions>
         <TabControl Margin="23,0,23,0" Grid.Row="1" x:Name="CreateSignatureControl" SelectionChanged="CreateSignatureControl_SelectionChanged" Style="{DynamicResource TabControlStyle1}">
-            <TabItem Style="{DynamicResource TabItemStyle1}" x:Name="InputItem" Header="Trackpad">
+            <TabItem Style="{DynamicResource TabItemStyle1}" x:Name="InputItem" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Button_Trackpad}">
                 <Grid>
                     <Grid.RowDefinitions>
                         <RowDefinition Height="11" />
@@ -345,7 +345,7 @@
                         <InkCanvas x:Name="DrawinkCanvas" Loaded="DrawinkCanvas_Loaded" Unloaded="DrawinkCanvas_Unloaded" Background="#F2F3F5" Grid.ColumnSpan="2" Margin="0,0,0,-10" />
                     </Grid>
                     <StackPanel Grid.Row="3" Grid.Column="2" VerticalAlignment="Center" Orientation="Horizontal">
-                        <TextBlock Text="Line Width"  VerticalAlignment="Center" />
+                        <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_LineWidth}"  VerticalAlignment="Center" />
                         <Slider  x:Name="StrokeWidthSlider" Width="96" Margin="12,0,0,0" Value="4" Minimum="1" IsSnapToTickEnabled="True"  Maximum="10" VerticalAlignment="Center" ValueChanged="StrokeWidth_ValueChanged"/>
                         <TextBox Text="{Binding ElementName=StrokeWidthSlider, Path=Value,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Width="72" Height="32" VerticalContentAlignment="Center" TextChanged="TextBox_TextChanged"/>
                     </StackPanel>
@@ -359,7 +359,7 @@
                     </StackPanel>
                 </Grid>
             </TabItem>
-            <TabItem Header="Keyboard" Style="{DynamicResource TabItemStyle1}">
+            <TabItem Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Button_Keyboard}" Style="{DynamicResource TabItemStyle1}">
                 <Grid>
                     <Grid.RowDefinitions>
                         <RowDefinition Height="11" />
@@ -376,7 +376,7 @@
                     VerticalContentAlignment="Center" Grid.ColumnSpan="2"
                         FontSize="45"/>
                     <StackPanel Grid.Row="3" Orientation="Horizontal" Grid.ColumnSpan="2">
-                        <TextBlock Text="Font" VerticalAlignment="Center"/>
+                        <TextBlock  Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Font}" VerticalAlignment="Center"/>
                         <ComboBox Width="232"
                         Style="{StaticResource ComboBoxStyle1}"
                         Margin="8,0,0,0"
@@ -401,7 +401,7 @@
                     </StackPanel>
                 </Grid>
             </TabItem>
-            <TabItem Header="Image" Style="{DynamicResource TabItemStyle1}">
+            <TabItem Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Button_Image}" Style="{DynamicResource TabItemStyle1}">
                 <Grid
                 AllowDrop="True"
                 PreviewDrop="Grid_Drop"
@@ -418,22 +418,21 @@
                             <RowDefinition Height="20"/>
                             <RowDefinition Height="38"/>
                         </Grid.RowDefinitions>
-                        <StackPanel x:Name="AddImagebackground" VerticalAlignment="Bottom">
+                        <StackPanel x:Name="AddImageBackground" VerticalAlignment="Bottom">
                             <Image Height="112" Width="112" Source="pack://application:,,,/Compdfkit_Tools;component/Asset/Resource/Annotation/Signature/Dropimage.png"/>
-                            <TextBlock Text="Drop image here"  HorizontalAlignment="Center"/>
-                            <TextBlock Text="or"  HorizontalAlignment="Center"/>
-                            <Button Style="{DynamicResource LinkButton}" HorizontalAlignment="Center" Content="Select a File" Click="OpenImage_Click"/>
+                            <TextBlock  Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Text_DropImage}"  HorizontalAlignment="Center"/>
+                            <Button Style="{DynamicResource LinkButton}" HorizontalAlignment="Center"  Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Link_SelectFile}" Click="OpenImage_Click"/>
                         </StackPanel>
-                        <Image x:Name="ImageImage" SourceUpdated="ImageImage_SourceUpdated" Grid.RowSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center"  Grid.ColumnSpan="4" Visibility="{Binding ElementName=AddImagebackground,Path=Visibility, Converter={StaticResource ReverseVisibilityConverter}}"/>
+                        <Image x:Name="ImageImage" SourceUpdated="ImageImage_SourceUpdated" Grid.RowSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center"  Grid.ColumnSpan="4" Visibility="{Binding ElementName=AddImageBackground,Path=Visibility, Converter={StaticResource ReverseVisibilityConverter}}"/>
                     </Grid>
                 </Grid>
             </TabItem>
         </TabControl>
         <Grid Grid.Row="2" Margin="11,0,11,0" VerticalAlignment="Top">
-            <Button Height="32" Width="72" HorizontalAlignment="Left" Content="Clear" Click="Clear_Click"/>
+            <Button Height="32" Width="72" HorizontalAlignment="Left" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Button_Clear}" Click="Clear_Click"/>
             <StackPanel Orientation="Horizontal" HorizontalAlignment="Right">
-                <Button Width="81" Height="32" Content="Cancel" Click="Cancel_Click"/>
-                <Button x:Name="SaveBtn" Width="136" Height="32" Content="Save" Margin="8,0,0,0" Click="Save_Click" Style="{StaticResource ButtonStyle}" IsEnabled="False"/>
+                <Button Width="81" Height="32" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Button_Cancel}" Click="Cancel_Click"/>
+                <Button x:Name="SaveBtn" Width="136" Height="32" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Button_Save}" Margin="8,0,0,0" Click="Save_Click" Style="{StaticResource ButtonStyle}" IsEnabled="False"/>
             </StackPanel>
         </Grid>
     </Grid>

+ 2 - 2
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateSignatureDialog.xaml.cs

@@ -78,7 +78,7 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
             DrawinkCanvas.Strokes.Clear();
             InPutTextBox.Text = "";
             ImageImage.Source = null;
-            AddImagebackground.Visibility = Visibility.Visible;
+            AddImageBackground.Visibility = Visibility.Visible;
             SaveBtn.IsEnabled = false;
 
             DrawinkCanvas.DefaultDrawingAttributes.Color = solidColorBrush.Color;
@@ -126,7 +126,7 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                     }
                     SaveToPath = path;
 
-                    AddImagebackground.Visibility = Visibility.Collapsed;
+                    AddImageBackground.Visibility = Visibility.Collapsed;
                     ImageImage.Source = targetBitmap;
                     SaveBtn.IsEnabled = true;
                 }

+ 13 - 13
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateStampDialog.xaml

@@ -17,6 +17,7 @@
                 <ResourceDictionary Source="../../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
             <cpdfcommon:ReverseVisibilityConverter x:Key="ReverseVisibilityConverter"/>
+            <cpdfcommon:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></cpdfcommon:PropertyPanelResourceConverter>
             <SolidColorBrush x:Key="TabItem.Selected.Background" Color="#FFFFFF"/>
             <SolidColorBrush x:Key="TabItem.Selected.Border" Color="#ACACAC"/>
             <Style x:Key="TabControlStyle1" TargetType="{x:Type TabControl}">
@@ -331,7 +332,7 @@
             <RowDefinition Height="11"/>
         </Grid.RowDefinitions>
         <TabControl Margin="23,0,23,0" x:Name="CreateHeader" Style="{DynamicResource TabControlStyle1}"  Grid.Row="1" SelectionChanged="CreateHeader_SelectionChanged">
-            <TabItem Header="Text Stamp" Style="{DynamicResource TabItemStyle1}">
+            <TabItem  Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Preview_Text}" Style="{DynamicResource TabItemStyle1}">
                 <Grid >
                     <Grid.RowDefinitions>
                         <RowDefinition Height="11" />
@@ -354,22 +355,22 @@
                             <RowDefinition Height="12"/>
                             <RowDefinition Height="20"/>
                         </Grid.RowDefinitions>
-                        <TextBlock Text="Preview" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
+                        <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Preview}" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
                         <Image Grid.Row="1" x:Name="TextImage"  HorizontalAlignment="Center" VerticalAlignment="Center"/>
                         <StackPanel Grid.Row="2" Orientation="Horizontal" Height="32">
-                            <TextBlock Margin="18,0,23,0" Text="Text" VerticalAlignment="Center"/>
+                            <TextBlock Margin="18,0,23,0" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Stamp_Text}" VerticalAlignment="Center"/>
                             <TextBox x:Name="StampText" Width="233"  Text="Stamp Text" VerticalContentAlignment="Center" TextChanged="TextBox_TextChanged"/>
                         </StackPanel>
-                        <CheckBox Grid.Row="4" Name="Date" Content="Date (YYYY-MM-DD)"  Checked="Date_Checked" Unchecked="Date_Unchecked"/>
-                        <CheckBox Grid.Row="6" Name="Time" Content="Time (HH:MM:SS)"  Checked="Time_Checked" Unchecked="Time_Unchecked"/>
+                        <CheckBox Grid.Row="4" Name="Date" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Check_Date}" Checked="Date_Checked" Unchecked="Date_Unchecked"/>
+                        <CheckBox Grid.Row="6" Name="Time" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Check_Time}" Checked="Time_Checked" Unchecked="Time_Unchecked"/>
                     </Grid>
                     <StackPanel Grid.Row="1">
-                        <TextBlock Text="Stamp Template:" VerticalAlignment="Center" FontSize="14" FontFamily="Segoe UI" FontWeight="Bold"/>
+                        <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Stamp_Template}" VerticalAlignment="Center" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
                         <ListBox x:Name="ShapeBox" SelectedIndex="0"  VerticalContentAlignment="Center" SelectionChanged="ShapeBox_SelectionChanged"/>
                     </StackPanel>
                 </Grid>
             </TabItem>
-            <TabItem Header="Image Stamp"  Style="{DynamicResource TabItemStyle1}">
+            <TabItem Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Preview_Image}"  Style="{DynamicResource TabItemStyle1}">
                 <Grid
                 AllowDrop="True"
                 PreviewDrop="Grid_Drop"
@@ -387,9 +388,8 @@
                         </Grid.RowDefinitions>
                         <StackPanel  x:Name="AddImagebackground"  VerticalAlignment="Bottom">
                             <Image Height="112" Width="112" Source="../../../Asset/Resource/Annotation/Signature/Dropimage.png"/>
-                            <TextBlock Text="Drop image here"  HorizontalAlignment="Center"/>
-                            <TextBlock Text="or"  HorizontalAlignment="Center"/>
-                            <Button Style="{DynamicResource LinkButton}" HorizontalAlignment="Center" Content="Select a File" Click="OpenImage_Click"/>
+                            <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Text_DropImage}"  HorizontalAlignment="Center"/>
+                            <Button Style="{DynamicResource LinkButton}" HorizontalAlignment="Center" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Link_SelectFile}" Click="OpenImage_Click"/>
                         </StackPanel>
                         <Image x:Name="ImageImage" SourceUpdated="ImageImage_SourceUpdated" Grid.RowSpan="3" HorizontalAlignment="Center" VerticalAlignment="Center"  Grid.ColumnSpan="4" Visibility="{Binding ElementName=AddImagebackground,Path=Visibility, Converter={StaticResource ReverseVisibilityConverter}}"/>
                     </Grid>
@@ -397,10 +397,10 @@
             </TabItem>
         </TabControl>
         <Grid Grid.Row="2" Margin="11,0,11,0" VerticalAlignment="Top">
-            <Button Content="Clear" Click="Clear_Click"  Height="32" Width="72" HorizontalAlignment="Left"/>
+            <Button Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Button_Clear}" Click="Clear_Click"  Height="32" Width="72" HorizontalAlignment="Left"/>
             <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" >
-                <Button Content="Cancel" Click="Cancel_Click" Width="81" Height="32"/>
-                <Button Content="Save" Click="Save_Click" x:Name="SaveBtn" Width="136" Height="32"  Margin="8,0,0,0" IsEnabled="True" Style="{StaticResource ButtonStyle}"/>
+                <Button Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Button_Cancel}" Click="Cancel_Click" Width="81" Height="32"/>
+                <Button Content="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Button_Save}" Click="Save_Click" x:Name="SaveBtn" Width="136" Height="32"  Margin="8,0,0,0" IsEnabled="True" Style="{StaticResource ButtonStyle}"/>
             </StackPanel>
         </Grid>
     </Grid>

+ 10 - 4
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFCreateStampDialog.xaml.cs

@@ -311,10 +311,16 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
         {
             ShapeBoxList = new ObservableCollection<string>
             {
-                "NormalText",
-                "Rectangle(Green)", "Rectangle(Blue)", "Rectangle(Red)",
-                "Left Arrow Stamp(Green)", "Left Arrow Stamp(Blue)", "Left Arrow Stamp(Red)",
-                "Right Arrow Stamp(Green)","Right Arrow Stamp(Blue)","Right Arrow Stamp(Red)"
+                Helper.LanguageHelper.PropertyPanelManager.GetString("Style_General"),
+                Helper.LanguageHelper.PropertyPanelManager.GetString("Rec_Green"),
+                Helper.LanguageHelper.PropertyPanelManager.GetString("Rec_Blue"),
+                Helper.LanguageHelper.PropertyPanelManager.GetString("Rec_Red"),
+                Helper.LanguageHelper.PropertyPanelManager.GetString("Left_Green"),
+                Helper.LanguageHelper.PropertyPanelManager.GetString("Left_Blue"),
+                Helper.LanguageHelper.PropertyPanelManager.GetString("Left_Red"),
+                Helper.LanguageHelper.PropertyPanelManager.GetString("Right_Green"),
+                Helper.LanguageHelper.PropertyPanelManager.GetString("Right_Blue"),
+                Helper.LanguageHelper.PropertyPanelManager.GetString("Right_Red")
             };
             var flags = BindingFlags.NonPublic | BindingFlags.Static;
             var dpiProperty = typeof(SystemParameters).GetProperty("Dpi", flags);

+ 2 - 2
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFDeleteDialog.xaml

@@ -28,8 +28,8 @@
             <RowDefinition Height="19"/>
         </Grid.RowDefinitions>
         <StackPanel Grid.Row="1" Grid.Column="1">
-            <TextBlock Height="24" x:Name="Title" FontSize="16" FontFamily="Segoe UI" FontWeight="Bold"/>
-            <TextBlock Height="20" x:Name="Content"  FontSize="14" FontFamily="Segoe UI" FontWeight="Regular"/>
+            <TextBlock Height="24" x:Name="Title" FontSize="16" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
+            <TextBlock Height="20" x:Name="Content"  FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Regular"/>
             <StackPanel Orientation="Horizontal" Margin="0,24,0,0">
                 <Button x:Name="Cancel" Content="Cancel" Width="132" Height="32" Click="Cancel_Click"/>
                 <Button x:Name="OK" Content="OK" Width="132" Height="32" Margin="8,0,0,0" Click="OK_Click" Style="{StaticResource ButtonStyle}"/>

+ 10 - 5
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFFreeTextUI.xaml

@@ -8,31 +8,36 @@
              xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl"
              mc:Ignorable="d" 
              d:DesignHeight="800" d:DesignWidth="300">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <cpdfcommon:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></cpdfcommon:PropertyPanelResourceConverter>
+        </ResourceDictionary>
+    </UserControl.Resources>
     <ScrollViewer VerticalScrollBarVisibility="Auto"> 
         <Grid Background="#FAFCFF">
             <StackPanel Orientation="Vertical">
                 <Border BorderThickness="1" BorderBrush="#1A000000">
                     <Grid  Height="40" Background="White" >
-                        <TextBlock x:Name="TitileTextBlock" Text="Text Box" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Segoe UI"></TextBlock>
+                        <TextBlock x:Name="TitileTextBlock" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_FreeText}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Microsoft YaHei"></TextBlock>
                     </Grid>
                 </Border>
                 <StackPanel Orientation="Vertical" Height="150">
                     <cpdftools:CPDFAnnotationPreviewerControl x:Name="CPDFAnnotationPreviewerControl" Height="100" Margin="16"></cpdftools:CPDFAnnotationPreviewerControl>
                 </StackPanel>
                 <StackPanel Height="75" Margin="5">
-                    <TextBlock Text="Font Color"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_FontColor}"></TextBlock>
                     <cpdfcommon:ColorPickerControl x:Name="ColorPickerControl"></cpdfcommon:ColorPickerControl>
                 </StackPanel>
                 <StackPanel Height="75" Margin="5">
-                    <TextBlock Text="Opacity"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Opacity}"></TextBlock>
                     <cpdfcommon:CPDFOpacityControl x:Name="CPDFOpacityControl"></cpdfcommon:CPDFOpacityControl>
                 </StackPanel>
                 <StackPanel Height="120" Margin="5">
-                    <TextBlock Text="Font Style"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_FontStyle}"></TextBlock>
                     <cpdfcommon:CPDFFontControl x:Name="CPDFFontControl" Width="228"></cpdfcommon:CPDFFontControl>
                 </StackPanel>
                 <StackPanel Height="200" Margin="5">
-                    <TextBlock Text="Note"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Note}"></TextBlock>
                     <TextBox Height="150"  x:Name="NoteTextBox" TextChanged="NoteTextBox_TextChanged" TextWrapping="Wrap" AcceptsReturn="True"></TextBox>
                 </StackPanel>
             </StackPanel>

+ 6 - 5
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFFreehandUI.xaml

@@ -13,6 +13,7 @@
             <ResourceDictionary.MergedDictionaries>
                 <ResourceDictionary Source="../../../Asset/Styles/ToggleButtonStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
+            <cpdfcommon:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></cpdfcommon:PropertyPanelResourceConverter>
         </ResourceDictionary>
     </UserControl.Resources>
     <ScrollViewer VerticalScrollBarVisibility="Auto"> 
@@ -20,7 +21,7 @@
         <StackPanel Orientation="Vertical">
             <Border BorderThickness="1" BorderBrush="#1A000000">
                 <Grid  Height="40" Background="White" >
-                    <TextBlock x:Name="TitileTextBlock" Text="Freehand" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Segoe UI"></TextBlock>
+                    <TextBlock x:Name="TitleTextBlock" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Ink}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Microsoft YaHei"></TextBlock>
                 </Grid>
             </Border>
             <StackPanel Orientation="Vertical" Height="130">
@@ -66,19 +67,19 @@
             
             <StackPanel Name="FreehandPanel" Orientation="Vertical">
                 <StackPanel Height="75" Margin="5">
-                    <TextBlock Text="Color"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Color}"></TextBlock>
                     <cpdfcommon:ColorPickerControl x:Name="ColorPickerControl" TransparentBtnProperty="Collapsed"></cpdfcommon:ColorPickerControl>
                 </StackPanel>
                 <StackPanel Height="75" Margin="5">
-                    <TextBlock Text="Opacity"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Opacity}"></TextBlock>
                     <cpdfcommon:CPDFOpacityControl x:Name="CPDFOpacityControl"></cpdfcommon:CPDFOpacityControl>
                 </StackPanel>
                 <StackPanel Height="75" Margin="5">
-                    <TextBlock Text="Line Width"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_LineWidth}"></TextBlock>
                     <cpdfcommon:CPDFThicknessControl x:Name="CPDFThicknessControl"></cpdfcommon:CPDFThicknessControl>
                 </StackPanel>
                 <StackPanel Height="200" Margin="5">
-                    <TextBlock Text="Note"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Note}"></TextBlock>
                     <TextBox Height="150" x:Name="NoteTextBox" TextChanged="NoteTextBox_TextChanged" TextWrapping="Wrap" AcceptsReturn="True"></TextBox>
                 </StackPanel>
             </StackPanel>

+ 8 - 7
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFLinkUI.xaml

@@ -12,6 +12,7 @@
     <UserControl.Resources>
         <cpdfcommon:TextLengthToVisibilityConverter x:Key="TextLengthToVisibilityConverter"></cpdfcommon:TextLengthToVisibilityConverter>
         <cpdfcommon:BoolToCollapsedConverter x:Key="BoolToCollapsedConverter"></cpdfcommon:BoolToCollapsedConverter>
+        <cpdfcommon:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></cpdfcommon:PropertyPanelResourceConverter>
         <SolidColorBrush x:Key="TabItem.Selected.Background" Color="#FFFFFF"/>
         <SolidColorBrush x:Key="TabItem.Selected.Border" Color="#ACACAC"/>
         <Style x:Key="TabControlStyle1" TargetType="{x:Type TabControl}">
@@ -427,7 +428,7 @@
         </Grid.RowDefinitions>
         <Border BorderThickness="1" BorderBrush="#1A000000">
             <Grid  Height="40" Background="White" >
-                <TextBlock x:Name="TitleTextBlock" Text="Link"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Segoe UI"></TextBlock>
+                <TextBlock x:Name="TitleTextBlock" Text="Link"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Microsoft YaHei"></TextBlock>
             </Grid>
         </Border>
         <ScrollViewer VerticalScrollBarVisibility="Auto" Grid.Row="1">
@@ -437,30 +438,30 @@
                     <RowDefinition Height="*"/>
                 </Grid.RowDefinitions>
                 <TabControl x:Name="HeadTabControl" Style="{DynamicResource TabControlStyle1}">
-                    <TabItem Style="{DynamicResource TabItemStyle1}" Header="Hyperlink">
+                    <TabItem Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=LinkType_URL}">
                         <Grid IsEnabled="{Binding InputEnable}">
                             <TextBox Style="{DynamicResource TextBoxStyle1}" Height="28"  x:Name="UrlText" VerticalContentAlignment="Center" TextChanged="UrlText_TextChanged" VerticalAlignment="Center" Margin="16"/>
-                            <TextBlock Text="https://www.compdf.com/" VerticalAlignment="Center"  Margin="22" Visibility="{Binding ElementName=UrlText, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False"  Foreground="#BBB"></TextBlock>
+                            <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Holder_URL}" VerticalAlignment="Center"  Margin="22" Visibility="{Binding ElementName=UrlText, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False"  Foreground="#BBB"></TextBlock>
                         </Grid>
                     </TabItem>
-                    <TabItem Style="{DynamicResource TabItemStyle1}" Header="Go To Pages">
+                    <TabItem Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=LinkType_Jump}">
                         <Grid IsEnabled="{Binding InputEnable}">
                             <TextBox Style="{DynamicResource TextBoxStyle1}" Height="28"  x:Name="PageText" VerticalContentAlignment="Center" TextChanged="PageText_TextChanged" VerticalAlignment="Center" Margin="16,0,16,0" Grid.ColumnSpan="2"/>
                             <TextBlock Text="{Binding PagePromptText, Mode=OneWay}" VerticalAlignment="Center"  Margin="22,0,22,0" Visibility="{Binding ElementName=PageText, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False"  Foreground="#BBB"></TextBlock>
                         </Grid>
                     </TabItem>
-                    <TabItem Style="{DynamicResource TabItemStyle1}" Header="Email">
+                    <TabItem Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=LinkType_Email}">
                         <Grid IsEnabled="{Binding InputEnable}">
                             <Grid.ColumnDefinitions>
                                 <ColumnDefinition Width="79*"/>
                                 <ColumnDefinition Width="319*"/>
                             </Grid.ColumnDefinitions>
                             <TextBox Style="{DynamicResource TextBoxStyle1}" Height="28" x:Name="EmailText" VerticalContentAlignment="Center"  TextChanged="EmailText_TextChanged" VerticalAlignment="Center" Margin="16,0,16,0" Grid.ColumnSpan="2"/>
-                            <TextBlock Text="support@compdf.com" VerticalAlignment="Center"  Margin="22,0,22,0" Visibility="{Binding ElementName=EmailText, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False"  Foreground="#BBB" Grid.ColumnSpan="2"></TextBlock>
+                            <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter}, ConverterParameter=Holder_Email}" VerticalAlignment="Center"  Margin="22,0,22,0" Visibility="{Binding ElementName=EmailText, Path=Text, Converter={StaticResource TextLengthToVisibilityConverter}}" IsHitTestVisible="False"  Foreground="#BBB" Grid.ColumnSpan="2"></TextBlock>
                         </Grid>
                     </TabItem>
                 </TabControl>
-                <Button Style="{DynamicResource ButtonStyle1}" x:Name="SaveBtn"  Background="#001A4E" Width="120" Height="32" Grid.Row="1" Foreground="#FFFFFF" Content="Save" VerticalAlignment="Top" Click="Save_Click" IsEnabled="False"/>
+                <Button Style="{DynamicResource ButtonStyle1}" x:Name="SaveBtn"  Background="#001A4E" Width="120" Height="32" Grid.Row="1" Foreground="#FFFFFF" Content="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Button_Save}" VerticalAlignment="Top" Click="Save_Click" IsEnabled="False"/>
             </Grid>
         </ScrollViewer>
     </Grid>

+ 3 - 3
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFLinkUI.xaml.cs

@@ -108,9 +108,9 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationUI
             EmailText.Text = "";
             SaveBtn.IsEnabled = true;
             totalPage = PageCount;
-            PagePromptText = "Add a Page Number Between 1 ~ " + totalPage;
+            PagePromptText = Helper.LanguageHelper.PropertyPanelManager.GetString("Holder_Jump") + totalPage;
 
-            if(param.Action==C_ACTION_TYPE.ACTION_TYPE_GOTO)
+            if (param.Action==C_ACTION_TYPE.ACTION_TYPE_GOTO)
             {
                 PageText.Text = param.PageIndex.ToString();
                 SelectedIndex = 1;
@@ -137,7 +137,7 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationUI
             InputEnable = true;
             //linkParam.LinkDrawFinished += LinkAnnot_LinkDrawFinished;
             totalPage = PageCount;
-            PagePromptText = "Add a Page Number Between 1 ~ " + totalPage;
+            PagePromptText = Helper.LanguageHelper.PropertyPanelManager.GetString("Holder_Jump") + totalPage;
         }
 
         private void LinkAnnot_LinkDrawFinished(object sender, bool e)

+ 9 - 4
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFMarkupUI.xaml

@@ -7,6 +7,11 @@
              xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl"
              mc:Ignorable="d" 
                d:DesignHeight="800" d:DesignWidth="300">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <cpdfcommon:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></cpdfcommon:PropertyPanelResourceConverter>
+        </ResourceDictionary>
+    </UserControl.Resources>
     <ScrollViewer VerticalScrollBarVisibility="Auto"> 
         <Grid Background="#FAFCFF">
             <Grid.RowDefinitions>
@@ -19,21 +24,21 @@
             <StackPanel Orientation="Vertical">
                 <Border BorderThickness="1" BorderBrush="#1A000000">
                     <Grid  Height="40" Background="White" >
-                        <TextBlock x:Name="TitleTextBlock"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Segoe UI"></TextBlock>
+                        <TextBlock x:Name="TitleTextBlock"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Microsoft YaHei"></TextBlock>
                     </Grid>
                 </Border>
                 <cpdftools:CPDFAnnotationPreviewerControl x:Name="CPDFAnnotationPreviewerControl" Height="100" Margin="16"></cpdftools:CPDFAnnotationPreviewerControl>
             </StackPanel>
             <StackPanel Grid.Row="1" Margin="5">
-                <TextBlock Text="Color"></TextBlock>
+                <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Color}"></TextBlock>
                 <cpdfcommon:ColorPickerControl x:Name="ColorPickerControl" TransparentBtnProperty="Collapsed"></cpdfcommon:ColorPickerControl>
             </StackPanel>
             <StackPanel Grid.Row="2" Margin="5">
-                <TextBlock Text="Opacity"></TextBlock>
+                <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Opacity}"></TextBlock>
                 <cpdfcommon:CPDFOpacityControl x:Name="CPDFOpacityControl"></cpdfcommon:CPDFOpacityControl>
             </StackPanel>
             <StackPanel Grid.Row="3" Margin="5">
-                <TextBlock Text="Note"></TextBlock>
+                <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Note}"></TextBlock>
                 <TextBox Height="150"  x:Name="NoteTextBox" TextChanged="NoteTextBox_TextChanged" TextWrapping="Wrap" AcceptsReturn="True"></TextBox>
             </StackPanel>
         </Grid>

+ 5 - 4
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFMarkupUI.xaml.cs

@@ -7,6 +7,7 @@ using ComPDFKitViewer;
 using System;
 using System.Windows.Controls;
 using System.Windows.Media;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.PDFControlUI
 {
@@ -175,16 +176,16 @@ namespace Compdfkit_Tools.PDFControlUI
             switch (annotationType)
             {
                 case CPDFAnnotationType.Highlight:
-                    TitleTextBlock.Text = "Highlight";
+                    TitleTextBlock.Text = LanguageHelper.PropertyPanelManager.GetString("Title_Highlight");
                     break;
                 case CPDFAnnotationType.Underline:
-                    TitleTextBlock.Text = "Underline";
+                    TitleTextBlock.Text = LanguageHelper.PropertyPanelManager.GetString("Title_Underline");
                     break;
                 case CPDFAnnotationType.Strikeout:
-                    TitleTextBlock.Text = "Strikethrough";
+                    TitleTextBlock.Text = LanguageHelper.PropertyPanelManager.GetString("Title_Strikeout");
                     break;
                 case CPDFAnnotationType.Squiggly:
-                    TitleTextBlock.Text = "Squiggly";
+                    TitleTextBlock.Text = LanguageHelper.PropertyPanelManager.GetString("Title_Squiggly");
                     break;
                 default:
                     throw new ArgumentException("Not Excepted Argument");

+ 8 - 3
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFNoteUI.xaml

@@ -8,23 +8,28 @@
              xmlns:cpdftools="clr-namespace:Compdfkit_Tools.PDFControl"
              mc:Ignorable="d" 
              d:DesignHeight="800" d:DesignWidth="300">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <cpdfcommon:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></cpdfcommon:PropertyPanelResourceConverter>
+        </ResourceDictionary>
+    </UserControl.Resources>
     <ScrollViewer VerticalScrollBarVisibility="Auto"> 
         <Grid Background="#FAFCFF">
             <StackPanel Orientation="Vertical">
                 <Border BorderThickness="1" BorderBrush="#1A000000">
                     <Grid  Height="40" Background="White" >
-                        <TextBlock x:Name="TitileTextBlock" Text="Note" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Segoe UI"></TextBlock>
+                        <TextBlock x:Name="TitileTextBlock" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Note}" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Microsoft YaHei"></TextBlock>
                     </Grid>
                 </Border>
                 <StackPanel Orientation="Vertical" Height="130">
                     <cpdftools:CPDFAnnotationPreviewerControl x:Name="CPDFAnnotationPreviewerControl" Height="100" Margin="16"></cpdftools:CPDFAnnotationPreviewerControl>
                 </StackPanel>
                 <StackPanel Height="75" Margin="5">
-                    <TextBlock Text="Border Color"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Color}"></TextBlock>
                     <cpdfcommon:ColorPickerControl x:Name="ColorPickerControl" TransparentBtnProperty="Collapsed"></cpdfcommon:ColorPickerControl>
                 </StackPanel>
                 <StackPanel Height="200" Margin="5">
-                    <TextBlock Text="Note"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Note}"></TextBlock>
                     <TextBox Height="150"  x:Name="NoteTextBox" TextChanged="NoteTextBox_TextChanged" TextWrapping="Wrap" AcceptsReturn="True"></TextBox>
                 </StackPanel>
             </StackPanel>

+ 17 - 8
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFShapeUI.xaml

@@ -8,43 +8,52 @@
             xmlns:cpdfcommon="clr-namespace:Compdfkit_Tools.Common"
              mc:Ignorable="d" 
              d:DesignHeight="800" d:DesignWidth="300">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <cpdfcommon:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></cpdfcommon:PropertyPanelResourceConverter>
+        </ResourceDictionary>
+    </UserControl.Resources>
     <ScrollViewer VerticalScrollBarVisibility="Auto"> 
         <Grid Background="#FAFCFF">
             <StackPanel Orientation="Vertical">
                 <Border BorderThickness="1" BorderBrush="#1A000000">
                     <Grid  Height="40" Background="White" >
-                        <TextBlock x:Name="TitleTextBlock"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Segoe UI"></TextBlock>
+                        <TextBlock x:Name="TitleTextBlock"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Microsoft YaHei"></TextBlock>
                     </Grid>
                 </Border>
                 <StackPanel Orientation="Vertical" Height="130">
                     <cpdftools:CPDFAnnotationPreviewerControl x:Name="CPDFAnnotationPreviewerControl" Height="100" Margin="16"></cpdftools:CPDFAnnotationPreviewerControl>
                 </StackPanel>
                 <StackPanel Height="75" Margin="5">
-                    <TextBlock Text="Line Color"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_StrokeColor}"></TextBlock>
                     <cpdfcommon:ColorPickerControl x:Name="BorderColorPickerControl" Brush="Red" TransparentBtnProperty ="Collapsed"></cpdfcommon:ColorPickerControl>
                 </StackPanel>
                 <StackPanel x:Name="FillColorStackPanel" Height="75" Margin="5">
-                    <TextBlock Text="Fill Color"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_FillColor}"></TextBlock>
                     <cpdfcommon:ColorPickerControl x:Name="FillColorPickerControl" Brush="Transparent"></cpdfcommon:ColorPickerControl>
                 </StackPanel>
                 <StackPanel Height="60" Margin="5">
-                    <TextBlock Text="Opacity"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Opacity}"></TextBlock>
                     <cpdfcommon:CPDFOpacityControl x:Name="CPDFOpacityControl"></cpdfcommon:CPDFOpacityControl>
                 </StackPanel>
                 <StackPanel Height="60" Margin="5">
-                    <TextBlock Text="Line Width"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_LineWidth}"></TextBlock>
                     <cpdfcommon:CPDFThicknessControl x:Name="CPDFThicknessControl"></cpdfcommon:CPDFThicknessControl>
                 </StackPanel>
                 <StackPanel x:Name="LineStyleStackPanel" Height="90" Margin="5">
-                    <TextBlock Text="Line and Border Style"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_LineStyle}"></TextBlock>
                     <cpdfcommon:CPDFLineStyleControl x:Name="CPDFLineStyleControl"></cpdfcommon:CPDFLineStyleControl>
                 </StackPanel>
                 <StackPanel x:Name="ArrowStackPanel" Visibility="Visible" Height="75"  Margin="5">
-                    <TextBlock Text="Start and End"></TextBlock>
+                    <StackPanel Orientation="Horizontal" Margin="0,0,0,10">
+                        <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Start}"></TextBlock>
+                        <TextBlock Text="&amp;" Margin="2,0,2,0"></TextBlock>
+                        <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_End}"></TextBlock>
+                    </StackPanel>
                     <cpdfcommon:CPDFArrowControl x:Name="CPDFArrowControl"></cpdfcommon:CPDFArrowControl>
                 </StackPanel>
                 <StackPanel Height="160" Margin="5">
-                    <TextBlock Text="Note"></TextBlock>
+                    <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Property_Note}"></TextBlock>
                     <TextBox Height="100"  x:Name="NoteTextBox"  TextChanged="NoteTextBox_TextChanged" TextWrapping="Wrap" AcceptsReturn="True"></TextBox>
                 </StackPanel>
             </StackPanel>

+ 6 - 4
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFShapeUI.xaml.cs

@@ -11,6 +11,8 @@ using System.IO.Ports;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Media;
+using Compdfkit_Tools.Helper;
+using ComPDFKit.PDFAnnotation;
 
 namespace Compdfkit_Tools.PDFControlUI
 {
@@ -531,19 +533,19 @@ namespace Compdfkit_Tools.PDFControlUI
             switch (annotationType)
             {
                 case CPDFAnnotationType.Square:
-                    TitleTextBlock.Text = "Rectangle";
+                    TitleTextBlock.Text = LanguageHelper.PropertyPanelManager.GetString("Title_Square");
                     InitWhenRectAndRound();
                     break;
                 case CPDFAnnotationType.Circle:
-                    TitleTextBlock.Text = "Circle";
+                    TitleTextBlock.Text = LanguageHelper.PropertyPanelManager.GetString("Title_Circle");
                     InitWhenRectAndRound();
                     break;
                 case CPDFAnnotationType.Arrow:
-                    TitleTextBlock.Text = "Arrow";
+                    TitleTextBlock.Text = LanguageHelper.PropertyPanelManager.GetString("Title_Arrow");
                     InitWhenArrowAndLine();
                     break;
                 case CPDFAnnotationType.Line:
-                    TitleTextBlock.Text = "Line";
+                    TitleTextBlock.Text = LanguageHelper.PropertyPanelManager.GetString("Title_Line");
                     InitWhenArrowAndLine();
                     break;
                 default:

+ 4 - 2
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFSignatureUI.xaml

@@ -4,6 +4,7 @@
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
              xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
              xmlns:local="clr-namespace:Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI"
+             xmlns:common="clr-namespace:Compdfkit_Tools.Common"
              mc:Ignorable="d" 
              Loaded="UserControl_Loaded"
              Unloaded="UserControl_Unloaded"
@@ -13,6 +14,7 @@
             <ResourceDictionary.MergedDictionaries>
                 <ResourceDictionary Source="../../../Asset/Styles/ButtonStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
+            <common:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></common:PropertyPanelResourceConverter>
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid  Background="#FAFCFF">
@@ -24,7 +26,7 @@
         </Grid.RowDefinitions>
         <Border BorderThickness="1" BorderBrush="#1A000000">
             <Grid  Height="40" Background="White" >
-                <TextBlock Text="Signature" FontFamily="Segoe UI" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
+                <TextBlock Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Sig}" FontFamily="Microsoft YaHei" FontSize="16" FontWeight="Bold" VerticalAlignment="Center" HorizontalAlignment="Center"/>
             </Grid>
         </Border>
         <Button Grid.Row="2" Height="32" Width="236"  Click="CreateSignature_Click" Style="{StaticResource ButtonStyle}">
@@ -33,7 +35,7 @@
                     <Grid Width="17" Height="16">
                         <Path Data="M9 7.5V3H8V7.5H3.5V8.5H8V13H9V8.5H13.5V7.5H9Z" Fill="White"/>
                     </Grid>
-                    <TextBlock Margin="4,0,0,0" Text="New Signature" FontFamily="Segoe UI" FontSize="14" FontWeight="Regular" Foreground="White"/>
+                    <TextBlock Margin="4,0,0,0" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Button_NewSig}" FontFamily="Microsoft YaHei" FontSize="14" FontWeight="Regular" Foreground="White"/>
                 </StackPanel>
             </Button.Content>
         </Button>

+ 3 - 1
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFSignatureUI.xaml.cs

@@ -14,6 +14,7 @@ using System.Windows.Controls;
 using System.Windows.Data;
 using System.Windows.Input;
 using System.Windows.Media.Imaging;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
 {
@@ -143,7 +144,8 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                     int index = SignatureList.IndexOf(data);
                     if (index != -1)
                     {
-                        CPDFDeleteDialog cPDFDeleteDialog = new CPDFDeleteDialog("Warning", "Are you sure to delete?");
+                        CPDFDeleteDialog cPDFDeleteDialog = new CPDFDeleteDialog(LanguageHelper.CommonManager.GetString("Caption_Warning"), 
+                            LanguageHelper.CommonManager.GetString("Warn_Delete"));
                         cPDFDeleteDialog.Owner = Window.GetWindow(this);
                         cPDFDeleteDialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                         cPDFDeleteDialog.ShowDialog();

+ 8 - 6
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUI.xaml

@@ -2,7 +2,8 @@
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:common="clr-namespace:Compdfkit_Tools.Common"
              mc:Ignorable="d" 
              Loaded="UserControl_Loaded"
              d:DesignHeight="450" d:DesignWidth="800">
@@ -13,6 +14,7 @@
                 <ResourceDictionary Source="../../../Asset/Styles/TabControlStyle.xaml"></ResourceDictionary>
                 <ResourceDictionary Source="../../../Asset/Styles/TabItemStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
+            <common:PropertyPanelResourceConverter x:Key="PropertyPanelResourceConverter"></common:PropertyPanelResourceConverter>
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid Background="#FAFCFF">
@@ -22,11 +24,11 @@
         </Grid.RowDefinitions>
         <Border BorderThickness="1" BorderBrush="#1A000000">
             <Grid  Height="40" Background="White" >
-                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="Stamp" FontSize="16" FontFamily="Segoe UI" FontWeight="Bold"/>
+                <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Title_Stamp}" FontSize="16" FontFamily="Microsoft YaHei" FontWeight="Bold"/>
             </Grid>
         </Border>
         <TabControl Grid.Row="1" Style="{DynamicResource TabControlStyle1}" >
-            <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="Standard">
+            <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Stamp_Standard}">
                 <ListBox
                 x:Name="StandardListBox"
                 VerticalAlignment="Top"
@@ -99,7 +101,7 @@
                     </ListBox.ItemContainerStyle>
                 </ListBox>
             </TabItem>
-            <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="Custom">
+            <TabItem Height="32" Style="{DynamicResource TabItemStyle1}" Header="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Stamp_Custom}">
                 <Grid>
                     <Grid.RowDefinitions>
                         <RowDefinition Height="72"/>
@@ -109,13 +111,13 @@
                         <Button Background="#001A4E"  Height="32" Width="114" Click="Text_Click">
                             <StackPanel Orientation="Horizontal">
                                 <Path Fill="White" Width="16" Height="16" Data="M13 3V5.4074H11.8889V4.11111H8.55569V11.5444H9.72871V12.6555H6.27192V11.5444H7.44458V4.11111H4.11111V5.4074H3V3H13Z"/>
-                                <TextBlock Margin="4,0,0,0" Text="Text Stamp" Foreground="White" FontSize="14" FontFamily="Segoe UI" FontWeight="Regular"/>
+                                <TextBlock Margin="4,0,0,0"  Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Custom_Text}" Foreground="White" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Regular"/>
                             </StackPanel>
                         </Button>
                         <Button Background="#001A4E"  Height="32" Width="114" Margin="8,0,0,0" Click="Image_Click">
                             <StackPanel Orientation="Horizontal">
                                 <Path Fill="White" Width="16" Height="16" Data="M1 2.6001H15V13.4001H1V2.6001ZM13.8 3.80009H2.2V10.5677L4.63597 8.00009L8.05143 10.8001L9.89748 8.8543L13.7153 12.2001H13.8V3.80009ZM11.6 7.20009C12.2627 7.20009 12.8 6.66283 12.8 6.00009C12.8 5.33735 12.2627 4.80009 11.6 4.80009C10.9373 4.80009 10.4 5.33735 10.4 6.00009C10.4 6.66283 10.9373 7.20009 11.6 7.20009Z" />
-                                <TextBlock Margin="4,0,0,0" Text="Image Stamp" Foreground="White" FontSize="14" FontFamily="Segoe UI" FontWeight="Regular"/>
+                                <TextBlock Margin="4,0,0,0"  Text="{Binding Converter={StaticResource PropertyPanelResourceConverter},ConverterParameter=Custom_Image}" Foreground="White" FontSize="14" FontFamily="Microsoft YaHei" FontWeight="Regular"/>
                             </StackPanel>
                         </Button>
                     </StackPanel>

+ 3 - 3
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFStampUI.xaml.cs

@@ -10,6 +10,7 @@ using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Data;
 using System.Windows.Input;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
 {
@@ -132,7 +133,6 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
             for (int i = 0; i < Path.Count; i++)
             {
                 CPDFStampData standardStamp = new CPDFStampData();
-                standardStamp.Author = "";
                 standardStamp.Opacity = 1;
                 standardStamp.SourcePath = Path[i];
                 standardStamp.StampText = StampText[i];
@@ -157,7 +157,6 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                 {
                     CPDFStampData customStamp = new CPDFStampData();
                     customStamp.Opacity = 1;
-                    customStamp.Author = stamps[i].Author;
                     customStamp.StampText = stamps[i].StampText;
                     customStamp.StampTextDate = stamps[i].StampTextDate;
                     customStamp.MaxWidth = stamps[i].MaxWidth;
@@ -201,7 +200,8 @@ namespace Compdfkit_Tools.Annotation.PDFAnnotationPanel.PDFAnnotationUI
                     if (index != -1)
                     {
 
-                        CPDFDeleteDialog cPDFDeleteDialog = new CPDFDeleteDialog("Warning", "Are you sure to delete?");
+                        CPDFDeleteDialog cPDFDeleteDialog = new CPDFDeleteDialog(LanguageHelper.CommonManager.GetString("Caption_Warning"), 
+                            LanguageHelper.CommonManager.GetString("Warn_Delete"));
                         cPDFDeleteDialog.Owner = Window.GetWindow(this);
                         cPDFDeleteDialog.WindowStartupLocation = WindowStartupLocation.CenterOwner;
                         cPDFDeleteDialog.ShowDialog();

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Annotation/PDFAnnotationPanel/PDFAnnotationUI/CPDFTempStampUI.xaml

@@ -12,7 +12,7 @@
             <StackPanel Orientation="Vertical">
                 <Border BorderThickness="1" BorderBrush="#1A000000">
                     <Grid  Height="40" Background="White" >
-                        <TextBlock x:Name="TitileTextBlock" Text="Image"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Segoe UI"></TextBlock>
+                        <TextBlock x:Name="TitileTextBlock" Text="Image"  HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="16" FontFamily="Microsoft YaHei"></TextBlock>
                     </Grid>
                 </Border>
                 <StackPanel Orientation="Vertical" Height="150">

+ 33 - 4
Demo/Examples/Compdfkit_Tools/Asset/Styles/ButtonStyle.xaml

@@ -76,7 +76,6 @@
             </Setter.Value>
         </Setter>
     </Style>
-
     <Style x:Key="FocusVisual">
         <Setter Property="Control.Template">
             <Setter.Value>
@@ -86,8 +85,7 @@
             </Setter.Value>
         </Setter>
     </Style>
- 
-
+  
     <Style x:Key="ButtonStyle" TargetType="{x:Type Button}">
         <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
         <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
@@ -254,4 +252,35 @@
             </Setter.Value>
         </Setter>
     </Style>
-</ResourceDictionary>
+
+    <Style x:Key="ImagePathButtonStyle" TargetType="{x:Type Button}">
+        <Setter Property="Background" Value="Transparent" />
+        <Setter Property="Foreground" Value="Black" />
+        <Setter Property="BorderBrush" Value="#5A000000" />
+        <Setter Property="BorderThickness" Value="1" />
+        <Setter Property="Padding" Value="10" />
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type Button}">
+                    <Border Background="{TemplateBinding Background}"
+                        BorderBrush="{TemplateBinding BorderBrush}"
+                        BorderThickness="{TemplateBinding BorderThickness}"
+                        x:Name="border">
+                        <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter TargetName="border" Property="Background" Value="#1A000000" />
+                        </Trigger>
+                        <Trigger Property="IsPressed" Value="True">
+                            <Setter TargetName="border" Property="Background" Value="#3A000000" />
+                        </Trigger>
+                        <Trigger Property="IsEnabled" Value="False">
+                            <Setter Property="Opacity" Value="0.5" />
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+</ResourceDictionary> 

+ 159 - 21
Demo/Examples/Compdfkit_Tools/Asset/Styles/ComboBoxStyle.xaml

@@ -1,7 +1,7 @@
 <ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                      xmlns:theme="clr-namespace:Microsoft.Windows.Themes;assembly=PresentationFramework.Aero2"
                     xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
-    <Style x:Key="FocusVisual">
+    <!--<Style x:Key="FocusVisual">
         <Setter Property="Control.Template">
             <Setter.Value>
                 <ControlTemplate>
@@ -259,26 +259,164 @@
                 <Setter Property="Canvas.Left" TargetName="opaqueRect" Value="{Binding HorizontalOffset, ElementName=DropDownScrollViewer}"/>
             </Trigger>
         </ControlTemplate.Triggers>
-    </ControlTemplate>
+    </ControlTemplate>-->
     <Style x:Key="ComboBoxStyle1" TargetType="{x:Type ComboBox}">
-        <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
-        <Setter Property="Background" Value="{StaticResource ComboBox.Static.Background}"/>
-        <Setter Property="BorderBrush" Value="{StaticResource ComboBox.Static.Border}"/>
-        <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.WindowTextBrushKey}}"/>
-        <Setter Property="BorderThickness" Value="1"/>
-        <Setter Property="ScrollViewer.HorizontalScrollBarVisibility" Value="Auto"/>
-        <Setter Property="ScrollViewer.VerticalScrollBarVisibility" Value="Auto"/>
-        <Setter Property="Padding" Value="6,3,5,3"/>
-        <Setter Property="ScrollViewer.CanContentScroll" Value="true"/>
-        <Setter Property="ScrollViewer.PanningMode" Value="Both"/>
-        <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
-        <Setter Property="Template" Value="{StaticResource ComboBoxTemplate}"/>
-        <Style.Triggers>
-            <Trigger Property="IsEditable" Value="true">
-                <Setter Property="IsTabStop" Value="false"/>
-                <Setter Property="Padding" Value="2"/>
-                <Setter Property="Template" Value="{StaticResource ComboBoxEditableTemplate}"/>
-            </Trigger>
-        </Style.Triggers>
+        <Setter Property="Background" Value="White"/>
+        <Setter Property="ItemContainerStyle">
+            <Setter.Value>
+                <!--CmbItem-->
+                <Style TargetType="ComboBoxItem">
+                    <Setter Property="MinHeight" Value="32"></Setter>
+                    <Setter Property="MinWidth" Value="60"></Setter>
+                    <Setter Property="FontSize" Value="12"></Setter>
+                    <Setter Property="Template">
+                        <Setter.Value>
+                            <ControlTemplate TargetType="ComboBoxItem">
+                                <Border Name="Back" Background="Transparent">
+                                    <ContentPresenter x:Name="contentPresenter" VerticalAlignment="Center" HorizontalAlignment="Left" Margin="5,0,0,0"></ContentPresenter>
+                                </Border>
+                                <ControlTemplate.Triggers>
+                                    <Trigger Property="IsMouseOver" Value="True">
+                                        <Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
+                                    </Trigger>
+                                    <Trigger Property="IsHighlighted" Value="True">
+                                        <Setter TargetName="Back" Property="Background" Value="LightGray"></Setter>
+                                    </Trigger> 
+                                </ControlTemplate.Triggers>
+                            </ControlTemplate>
+                        </Setter.Value>
+                    </Setter>
+                </Style>
+            </Setter.Value>
+        </Setter>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type ComboBox}">
+                    <Border x:Name="comboBoxBorder" BorderThickness="1" BorderBrush="#AFAFAF" Background="{TemplateBinding Background}" >
+                        <Grid >
+                            <Grid.ColumnDefinitions>
+                                <ColumnDefinition Width="3*"/>
+                                <ColumnDefinition Width="*"/>
+                            </Grid.ColumnDefinitions>
+                            <Grid Grid.Column="0" x:Name="grid">
+                                <ToggleButton
+                                Width="{Binding ElementName=grid,Path=ActualWidth}"
+                                Height="{Binding ElementName=grid, Path=ActualHeight}"
+                                Content="{TemplateBinding Text}" VerticalAlignment="Center"
+                                HorizontalAlignment="Left" Margin="5,0,0,0"
+                                BorderThickness="0"
+                                Foreground="{TemplateBinding Foreground}"
+                                Background="{TemplateBinding Background}" 
+                                IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}" ClickMode="Press"
+                                >
+                                    <ToggleButton.Style >
+                                        <Style TargetType="ToggleButton">
+                                            <Setter Property="Background" Value="White"/>
+                                            <Setter Property="Template">
+                                                <Setter.Value>
+                                                    <ControlTemplate TargetType="ToggleButton">
+                                                        <Border   Background="{TemplateBinding Background}" BorderThickness="0"  >
+                                                            <TextBlock Foreground="{TemplateBinding Foreground}" Text="{TemplateBinding Content}" Margin="4 0 0 0"  HorizontalAlignment="Left" VerticalAlignment="Center"/>
+                                                        </Border>
+                                                    </ControlTemplate>
+                                                </Setter.Value>
+                                            </Setter>
+                                            <Style.Triggers>
+                                                <Trigger Property="IsMouseOver" Value="True">
+                                                    <Setter Property="Background" Value="White"/>
+                                                </Trigger>
+                                                <Trigger Property="IsMouseOver" Value="False">
+                                                    <Setter Property="Background" Value="White"/>
+                                                </Trigger>
+                                            </Style.Triggers>
+                                        </Style>
+                                    </ToggleButton.Style>
+                                </ToggleButton>
+                            </Grid>
+
+                            <Grid Grid.Column="1" >
+                                <ToggleButton IsChecked="{Binding Path=IsDropDownOpen, Mode=TwoWay, RelativeSource={RelativeSource TemplatedParent}}"
+                                          Foreground="{TemplateBinding Foreground}"
+                                          ClickMode="Press">
+                                    <ToggleButton.Style>
+                                        <Style TargetType="ToggleButton">
+                                            <Setter Property="Background" Value="White"/>
+                                            <Setter Property="Template">
+                                                <Setter.Value>
+                                                    <ControlTemplate TargetType="ToggleButton">
+                                                        <Border Background="{TemplateBinding Background}" BorderThickness="{TemplateBinding BorderThickness}">
+                                                            <Grid>
+                                                                <Viewbox x:Name="ArrowVbx" Width="12" Height="12">
+                                                                    <Path Fill="#666666" Data="M9.95941,0.800781 L11.1998,1.88866 L5.9998,7.20078 L0.799805,1.88866 L2.0402,0.800781 L5.9998,4.8452 L9.95941,0.800781 Z"/>
+                                                                    <Viewbox.RenderTransform>
+                                                                        <TransformGroup>
+                                                                            <ScaleTransform/>
+                                                                            <SkewTransform/>
+                                                                            <RotateTransform CenterX="6" CenterY="4" Angle="0"/>
+                                                                            <TranslateTransform/>
+                                                                        </TransformGroup>
+                                                                    </Viewbox.RenderTransform>
+                                                                </Viewbox>
+                                                            </Grid>
+                                                        </Border>
+                                                        <ControlTemplate.Triggers>
+                                                            <EventTrigger RoutedEvent="Checked">
+                                                                <BeginStoryboard>
+                                                                    <Storyboard >
+                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ArrowVbx" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
+                                                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
+                                                                            <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="180"/>
+                                                                        </DoubleAnimationUsingKeyFrames>
+                                                                    </Storyboard>
+                                                                </BeginStoryboard>
+                                                            </EventTrigger>
+
+                                                            <EventTrigger RoutedEvent="Unchecked">
+                                                                <BeginStoryboard>
+                                                                    <Storyboard >
+                                                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="ArrowVbx" Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)">
+                                                                            <EasingDoubleKeyFrame KeyTime="00:00:00" Value="180"/>
+                                                                            <EasingDoubleKeyFrame KeyTime="00:00:00.2000000" Value="0"/>
+                                                                        </DoubleAnimationUsingKeyFrames>
+                                                                    </Storyboard>
+                                                                </BeginStoryboard>
+                                                            </EventTrigger>
+                                                        </ControlTemplate.Triggers>
+                                                    </ControlTemplate>
+                                                </Setter.Value>
+                                            </Setter>
+                                        </Style>
+                                    </ToggleButton.Style>
+                                </ToggleButton>
+                            </Grid>
+                            <Popup IsOpen="{TemplateBinding IsDropDownOpen}" Placement="Bottom" x:Name="Popup" Focusable="False" AllowsTransparency="True" PopupAnimation="Slide">
+                                <Border CornerRadius="1" MaxHeight="{TemplateBinding MaxDropDownHeight}" MinWidth="{TemplateBinding ActualWidth}" x:Name="DropDown" SnapsToDevicePixels="True">
+                                    <Border.Effect>
+                                        <DropShadowEffect Color="Black" BlurRadius="4" ShadowDepth="0" Opacity="0.5"/>
+                                    </Border.Effect>
+                                    <ScrollViewer Margin="4,6,4,6" Style="{DynamicResource ScrollViewerStyle}" MaxHeight="{TemplateBinding MaxDropDownHeight}" SnapsToDevicePixels="True" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" CanContentScroll="True">
+                                        <StackPanel IsItemsHost="True" KeyboardNavigation.DirectionalNavigation="Contained" Background="White"/>
+                                    </ScrollViewer>
+                                </Border>
+                            </Popup>
+                        </Grid>
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter TargetName="comboBoxBorder" Property="BorderBrush" Value="#388EF7"></Setter>
+                            <Setter Property="Effect">
+                                <Setter.Value>
+                                    <DropShadowEffect Color="#00BFFF" ShadowDepth="0" BlurRadius="5" Opacity="0.5"/>
+                                </Setter.Value>
+                            </Setter>
+                        </Trigger>
+
+                        <Trigger Property="IsEnabled" Value="False">
+                            <Setter Property="Opacity" Value="0.5" /> 
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
     </Style>
 </ResourceDictionary>

File diff suppressed because it is too large
+ 32 - 0
Demo/Examples/Compdfkit_Tools/Asset/Styles/EyeCheckBoxStyle.xaml


+ 96 - 2
Demo/Examples/Compdfkit_Tools/Asset/Styles/RadioButtonStyle.xaml

@@ -41,8 +41,8 @@
                                         <RowDefinition Height="25"></RowDefinition>
                                         <RowDefinition></RowDefinition>
                                     </Grid.RowDefinitions>
-                                    <TextBlock Text="{TemplateBinding Title}" TextWrapping="Wrap" FontSize="14" FontWeight="Bold" FontFamily="Segoe UI"></TextBlock>
-                                    <TextBlock Grid.Row="1" Text="{TemplateBinding Description}" TextWrapping="Wrap" FontSize="12" FontWeight="Normal" FontFamily="Segoe UI"></TextBlock>
+                                    <TextBlock Text="{TemplateBinding Title}" TextWrapping="Wrap" FontSize="14" FontWeight="Bold" FontFamily="Microsoft YaHei"></TextBlock>
+                                    <TextBlock Grid.Row="1" Text="{TemplateBinding Description}" TextWrapping="Wrap" FontSize="12" FontWeight="Normal" FontFamily="Microsoft YaHei"></TextBlock>
                                 </Grid>
                             </Grid>
                         </Border>
@@ -61,4 +61,98 @@
             </Setter.Value>
         </Setter>
     </Style>
+    <Style x:Key="{x:Type RadioButton}" TargetType="{x:Type RadioButton}">
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RadioButton}">
+                    <Grid HorizontalAlignment="Left">
+                        <Grid.ColumnDefinitions>
+                            <ColumnDefinition Width="32"></ColumnDefinition>
+                            <ColumnDefinition></ColumnDefinition>
+                        </Grid.ColumnDefinitions>
+                        <Grid>
+                            <Ellipse x:Name="radioEllipse"
+                             Width="16"
+                             Height="16"
+                             Fill="White"
+                             Stroke="{TemplateBinding BorderBrush}"
+                             StrokeThickness="1"/>
+                            <Ellipse x:Name="innerEllipse"
+                             Width="11"
+                             Height="11"
+                             Fill="Black"
+                             Opacity="0"/>
+                        </Grid>
+                        <Grid x:Name="textGd"  Grid.Column="1" VerticalAlignment="Center">
+                            <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+                                <ContentPresenter.Style>
+                                    <Style TargetType="ContentPresenter">
+                                        <Style.Triggers>
+                                            <DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource TemplatedParent}}" Value="False">
+                                                <Setter Property="Opacity" Value="0.5"/>
+                                            </DataTrigger>
+                                        </Style.Triggers>
+                                    </Style>
+                                </ContentPresenter.Style>
+                            </ContentPresenter>
+                        </Grid>
+                    </Grid>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsChecked" Value="True">
+                            <Setter TargetName="innerEllipse" Property="Opacity" Value="1"></Setter>
+                        </Trigger>
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter TargetName="radioEllipse" Property="Stroke" Value="DodgerBlue"></Setter>
+                        </Trigger>
+                        <Trigger Property="IsEnabled" Value="False">
+                            <Setter TargetName="radioEllipse" Property="Fill" Value="#1A000000"></Setter>
+                            <Setter TargetName="radioEllipse" Property="Stroke" Value="#5A000000"></Setter>
+                            <Setter TargetName="innerEllipse" Property="Fill" Value="#1A000000"></Setter>
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+    <Style x:Key="MatrixRadioButton" TargetType="{x:Type RadioButton}">
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="{x:Type RadioButton}">
+                    <Grid>
+                        <Grid>
+                            <Rectangle x:Name="radioRectangle"
+                          Width="28"
+                          Height="28"
+                          Fill="#DDE9FF"/>
+                        </Grid>
+                        <Grid x:Name="textGd"  Grid.Column="1" VerticalAlignment="Center">
+                            <ContentPresenter HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
+                                <ContentPresenter.Style>
+                                    <Style TargetType="ContentPresenter">
+                                        <Style.Triggers>
+                                            <DataTrigger Binding="{Binding IsEnabled, RelativeSource={RelativeSource TemplatedParent}}" Value="False">
+                                                <Setter Property="Opacity" Value="0.5"/>
+                                            </DataTrigger>
+                                        </Style.Triggers>
+                                    </Style>
+                                </ContentPresenter.Style>
+                            </ContentPresenter>
+                        </Grid>
+                    </Grid>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsChecked" Value="True">
+                            <Setter TargetName="radioRectangle" Property="Fill" Value="#4982E6"></Setter>
+                        </Trigger>
+                        <Trigger Property="IsMouseOver" Value="True">
+                            <Setter TargetName="radioRectangle" Property="Fill" Value="#93B6F3"></Setter>
+                        </Trigger>
+                        <Trigger Property="IsPressed" Value="True">
+                            <Setter TargetName="radioRectangle" Property="Fill" Value="#3953A4"></Setter>
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
 </ResourceDictionary>

+ 36 - 0
Demo/Examples/Compdfkit_Tools/Asset/Styles/RoundCornerPasswordBoxStyle.xaml

@@ -0,0 +1,36 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <Style TargetType="PasswordBox" x:Key="RoundCornerPasswordBoxStyle">
+        <Setter Property="Height" Value="36"/>
+        <Setter Property="FontSize" Value="14"/>
+        <Setter Property="Padding" Value="10,0,30,0"/>
+        <Setter Property="Background" Value="Transparent"></Setter>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="PasswordBox">
+                    <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" 
+                                    BorderThickness="{TemplateBinding BorderThickness}" 
+                                    Background="{TemplateBinding Background}" 
+                                    SnapsToDevicePixels="True"
+                                    CornerRadius="3">
+                        <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
+                                                  HorizontalScrollBarVisibility="Hidden" 
+                                                  VerticalScrollBarVisibility="Hidden"
+                                                  VerticalAlignment="Center" MinHeight="20"/>
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter Property="Opacity" TargetName="Border" Value="0.56"/>
+                        </Trigger>
+                        <Trigger Property="IsMouseOver" Value="true">
+                            <Setter Property="BorderBrush" TargetName="Border" Value="#FF7EB4EA"/>
+                        </Trigger>
+                        <Trigger Property="IsKeyboardFocused" Value="true">
+                            <Setter Property="BorderBrush" TargetName="Border" Value="#FF569DE5"/>
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+</ResourceDictionary>

+ 42 - 0
Demo/Examples/Compdfkit_Tools/Asset/Styles/RoundCornerTextBoxStyle.xaml

@@ -0,0 +1,42 @@
+<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
+    <Style TargetType="TextBox" x:Key="RoundCornerTextBox">
+        <Setter Property="Height" Value="36"/>
+        <Setter Property="FontSize" Value="14"/>
+        <Setter Property="Padding" Value="10,0,15,0"/>
+        <Setter Property="Background" Value="Transparent"></Setter>
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="TextBox">
+                    <Border x:Name="Border" BorderBrush="{TemplateBinding BorderBrush}" 
+                                    BorderThickness="{TemplateBinding BorderThickness}" 
+                                    Background="{TemplateBinding Background}" 
+                                    SnapsToDevicePixels="True"
+                                    CornerRadius="3">
+                        <ScrollViewer x:Name="PART_ContentHost" Focusable="false"
+                                                  HorizontalScrollBarVisibility="Hidden" 
+                                                  VerticalScrollBarVisibility="Hidden"
+                                                  VerticalAlignment="Center" MinHeight="20"/>
+                    </Border>
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="IsEnabled" Value="false">
+                            <Setter Property="Opacity" TargetName="Border" Value="0.56"/>
+                        </Trigger>
+                        <Trigger Property="IsMouseOver" Value="true">
+                            <Setter Property="BorderBrush" TargetName="Border" Value="#FF7EB4EA"/>
+                        </Trigger>
+                        <Trigger Property="IsKeyboardFocused" Value="true">
+                            <Setter Property="BorderBrush" TargetName="Border" Value="#FF569DE5"/>
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+    <Style TargetType="TextBox" x:Key="AccountTextBoxStyle" BasedOn="{StaticResource RoundCornerTextBox}"></Style>
+    
+    <Style TargetType="TextBox" x:Key="PasswordTextBoxStyle" BasedOn="{StaticResource RoundCornerTextBox}">
+        <Setter Property="Padding" Value="15,0,30,0"/>
+    </Style>
+</ResourceDictionary>

+ 3 - 2
Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFAnnotationBarControl.xaml.cs

@@ -6,6 +6,7 @@ using System.Windows.Controls;
 using System.Windows.Controls.Primitives;
 using System.Windows.Media;
 using System.Windows.Shapes;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.PDFControl
 {
@@ -294,7 +295,6 @@ namespace Compdfkit_Tools.PDFControl
                 toggleButton.Content = canvas;
                 toggleButton.Click -= ToggleButton_Click;
                 toggleButton.Click += ToggleButton_Click;
-                toggleButton.ToolTip = toggleButton.Tag.ToString();
                 Grid.SetColumn(toggleButton, annotationCounter++);
                 AnnotationGrid.Children.Add(toggleButton);
             }
@@ -386,7 +386,8 @@ namespace Compdfkit_Tools.PDFControl
                 CPDFAnnotationType annotation = annotationProperties[i];
                 ToggleButton toggleButton = new ToggleButton
                 {
-                    Tag = annotation.ToString()
+                    Tag = annotation.ToString(),
+                    ToolTip = LanguageHelper.ToolBarManager.GetString("Tooltip_" + annotation)
                 };
                 CreateAnnotationButton(toggleButton);
                 AnnotationGrid.Width += 50;

File diff suppressed because it is too large
+ 169 - 172
Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFBOTABarControl.xaml.cs


File diff suppressed because it is too large
+ 11 - 7
Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFDigitalSignatureBarControl.xaml.cs


+ 44 - 2
Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFPageEditBarControl.xaml.cs

@@ -7,12 +7,22 @@ using System.Windows.Controls;
 using System.Windows.Controls.Primitives;
 using System.Windows.Media;
 using System.Windows.Shapes;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.PDFControl
 {
     public partial class CPDFPageEditBarControl : UserControl, INotifyPropertyChanged
     {
         #region Data
+
+        private string insert = LanguageHelper.ToolBarManager.GetString("Button_Insert");
+        private string replace = LanguageHelper.ToolBarManager.GetString("Button_Replace");
+        private string extract = LanguageHelper.ToolBarManager.GetString("Button_Extract");
+        private string reverse = LanguageHelper.ToolBarManager.GetString("Button_Reverse");
+        private string copy = LanguageHelper.ToolBarManager.GetString("Button_Copy");
+        private string rotate = LanguageHelper.ToolBarManager.GetString("Button_Rotate");
+        private string delete = LanguageHelper.ToolBarManager.GetString("Button_Delete");
+        
         Dictionary<string, string> ButtonDict = new Dictionary<string, string>
         {
             {"Insert","M0.25 0.25H11.3107L15.75 4.68934V10H14.25V5.311L10.689 1.75H1.75V16.25H8V17.75H0.25V0.25ZM12.75 17H11.25V14.75H9V13.25H11.25V11H12.75V13.25H15V14.75H12.75V17Z"},
@@ -79,7 +89,7 @@ namespace Compdfkit_Tools.PDFControl
             }
             if (!string.IsNullOrEmpty(name))
             {
-                textBlock.Text = name;
+                textBlock.Text = GetToolString(name);
                 textBlock.VerticalAlignment = VerticalAlignment.Center;
                 textBlock.Margin = new Thickness(8, 0, 0, 0);
                 textBlock.FontSize = 12;
@@ -92,13 +102,45 @@ namespace Compdfkit_Tools.PDFControl
             button.BorderThickness = new Thickness(0);
             button.Padding = new Thickness(10, 5, 10, 5);
             button.Tag = name;
-            button.ToolTip = name;
+            button.ToolTip = GetToolString(name);
             button.Style = style;
             button.Content = stackPanel;
             button.Click -= PageEditBtn_Click;
             button.Click += PageEditBtn_Click;
             FormGrid.Children.Add(button);
         }
+        
+        private string GetToolString(string name)
+        {
+            string tooltip = string.Empty;
+            switch (name)
+            {
+                case "Insert":
+                    tooltip = insert;
+                    break;
+                case "Replace":
+                    tooltip = replace;
+                    break;
+                case "Extract":
+                    tooltip = extract;
+                    break;
+                case "Reverse":
+                    tooltip = reverse;
+                    break;
+                case "Copy":
+                    tooltip = copy;
+                    break;
+                case "Rotate":
+                    tooltip = rotate;
+                    break;
+                case "Delete":
+                    tooltip = delete;
+                    break;
+                default:
+                    break;
+            }
+            return tooltip;
+        }
 
         private void PageEditBtn_Click(object sender, RoutedEventArgs e)
         {

+ 14 - 11
Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFTitleBarControl.xaml

@@ -2,7 +2,8 @@
              xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
              xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
              xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
-             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:common="clr-namespace:Compdfkit_Tools.Common"
              mc:Ignorable="d" 
              d:DesignHeight="40" d:DesignWidth="1280">
     <UserControl.Resources>
@@ -10,6 +11,7 @@
             <ResourceDictionary.MergedDictionaries>
                 <ResourceDictionary Source="../../Asset/Styles/MenuItemStyle.xaml"></ResourceDictionary>
             </ResourceDictionary.MergedDictionaries>
+            <common:CommonResourceConverter x:Key="CommonResourceConverter"></common:CommonResourceConverter>
         </ResourceDictionary>
     </UserControl.Resources>
     <Grid x:Name="TitleBarGrid" Background="#FFFFFF" HorizontalAlignment="Stretch">
@@ -21,18 +23,19 @@
                   VerticalAlignment="Top"
                   HorizontalAlignment="Left">
                     
-                    <MenuItem Header="File" Style="{StaticResource Dropdown_MenuItem}">
-                        <MenuItem Header="Open File(Ctrl+O)" Name="OpenFileItem" Style="{StaticResource Sub_MenuItem}" Click="OpenFileItem_Click"></MenuItem>
-                        <MenuItem Header="Save File(Ctrl+S)" Style="{StaticResource Sub_MenuItem}"  Click="SaveFileItem_Click" IsEnabled="{Binding CanSave, RelativeSource={RelativeSource AncestorType=UserControl}}"></MenuItem>
-                        <MenuItem Header="Save As(Ctrl+Shift+S)" Style="{StaticResource Sub_MenuItem}"  Click="SaveAsItem_Click"></MenuItem>
+                    <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Menu_File}" Style="{StaticResource Dropdown_MenuItem}">
+                        <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=FileMenu_Open}" Name="OpenFileItem" Style="{StaticResource Sub_MenuItem}" Click="OpenFileItem_Click"></MenuItem>
+                        <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=FileMenu_Save}" Style="{StaticResource Sub_MenuItem}"  Click="SaveFileItem_Click" IsEnabled="{Binding CanSave, RelativeSource={RelativeSource AncestorType=UserControl}}"></MenuItem>
+                        <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=FileMenu_SaveAs}" Style="{StaticResource Sub_MenuItem}"  Click="SaveAsItem_Click"></MenuItem>
                     </MenuItem>
                     
-                    <MenuItem Header="Help" Style="{StaticResource Dropdown_MenuItem}">
-                        <MenuItem Header="About Us" Style="{StaticResource Sub_MenuItem}" Click="AboutUsItem_Click"></MenuItem>
-                        <MenuItem Header="Contact Us" Style="{StaticResource Sub_MenuItem}" Click="ContactUs_Click"></MenuItem>
-                        <MenuItem Header="Privacy Agreement" Style="{StaticResource Sub_MenuItem}" Click="PrivacyAgreement_Click"></MenuItem>
-                        <MenuItem Header="Service Terms" Style="{StaticResource Sub_MenuItem}" Click="ServiceTerms_Click"></MenuItem>
-                        <MenuItem Header="Developer Device ID" Style="{StaticResource Sub_MenuItem}" Click="DeviceSerial_Click"></MenuItem>
+                    <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Menu_Help}" Style="{StaticResource Dropdown_MenuItem}">
+                        <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_About}" Style="{StaticResource Sub_MenuItem}" Click="AboutUsItem_Click"></MenuItem>
+                        <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_Contact}" Style="{StaticResource Sub_MenuItem}" Click="ContactUs_Click"></MenuItem>
+                        <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_Support}" Style="{StaticResource Sub_MenuItem}" Click="TechnicalSupport_Click"></MenuItem>
+                        <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_Privacy}" Style="{StaticResource Sub_MenuItem}" Click="PrivacyAgreement_Click"></MenuItem>
+                        <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_Service}" Style="{StaticResource Sub_MenuItem}" Click="ServiceTerms_Click"></MenuItem>
+                        <MenuItem Header="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=HelpMenu_DeviceID}" Style="{StaticResource Sub_MenuItem}" Click="DeviceSerial_Click"></MenuItem>
                     </MenuItem>
                 </Menu>
 

+ 5 - 0
Demo/Examples/Compdfkit_Tools/Common/BarControl/CPDFTitleBarControl.xaml.cs

@@ -48,6 +48,11 @@ namespace Compdfkit_Tools.PDFControl
         {
             System.Diagnostics.Process.Start("https://www.compdf.com/contact-sales");
         }
+        
+        private void TechnicalSupport_Click(object sender, RoutedEventArgs e)
+        {
+            System.Diagnostics.Process.Start("https://www.compdf.com/support");
+        }
 
         private void PrivacyAgreement_Click(object sender, RoutedEventArgs e)
         {

File diff suppressed because it is too large
+ 34 - 30
Demo/Examples/Compdfkit_Tools/Common/BarControl/FormBarControl.xaml.cs


+ 30 - 0
Demo/Examples/Compdfkit_Tools/Common/BaseControl/CustomProgressBarControl.xaml

@@ -0,0 +1,30 @@
+<UserControl x:Class="Compdfkit_Tools.Common.CustomProgressBarControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+             xmlns:local="clr-namespace:Compdfkit_Tools.Common"
+             mc:Ignorable="d" 
+             d:DesignHeight="25" d:DesignWidth="400">
+    <UserControl.Resources>
+        <local:CommonResourceConverter x:Key="CommonResourceConverter"></local:CommonResourceConverter>
+    </UserControl.Resources>
+
+    <Grid x:Name="Grid" Margin="5,0,5,0">
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="Auto"></ColumnDefinition>
+            <ColumnDefinition Width="*"></ColumnDefinition>
+            <ColumnDefinition Width="Auto"></ColumnDefinition>
+        </Grid.ColumnDefinitions>
+
+        <TextBlock Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Property_Progress}" FontFamily="Microsoft YaHei" FontSize="14" VerticalAlignment="Center"></TextBlock>
+        
+        <ProgressBar Grid.Column="1" Height="{Binding ProgressBarHeight}" Foreground="#0078D7" Margin="5,0,5,0" Value="{Binding ProgressValue}" Maximum="{Binding ProgressMaxValue}"></ProgressBar>
+        
+        <StackPanel Grid.Column="2" Orientation="Horizontal" VerticalAlignment="Center">
+            <TextBlock Text="{Binding ProgressValue}" FontFamily="Microsoft YaHei" FontSize="14"></TextBlock>
+            <TextBlock Text=" / " FontFamily="Microsoft YaHei" FontSize="14"></TextBlock>
+            <TextBlock Text="{Binding ProgressMaxValue}" FontFamily="Microsoft YaHei" FontSize="14"></TextBlock>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 59 - 0
Demo/Examples/Compdfkit_Tools/Common/BaseControl/CustomProgressBarControl.xaml.cs

@@ -0,0 +1,59 @@
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Runtime.CompilerServices;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Compdfkit_Tools.Common
+{
+    public partial class CustomProgressBarControl : UserControl,INotifyPropertyChanged
+    {
+        public static readonly DependencyProperty ProgressValueProperty =
+            DependencyProperty.Register(nameof(ProgressValue), typeof(int), typeof(CustomProgressBarControl), new PropertyMetadata(0));
+        public int ProgressValue
+        {
+            get => (int)GetValue(ProgressValueProperty);
+            set => SetValue(ProgressValueProperty, value);
+        }
+        
+        public static readonly DependencyProperty ProgressMaxValueProperty =
+            DependencyProperty.Register(nameof(ProgressMaxValue), typeof(int), typeof(CustomProgressBarControl), new PropertyMetadata(100));
+        public int ProgressMaxValue
+        {
+            get => (int)GetValue(ProgressMaxValueProperty);
+            set => SetValue(ProgressMaxValueProperty, value);
+        }
+        
+        public static readonly DependencyProperty ProgressBarHeightProperty =
+            DependencyProperty.Register(nameof(ProgressBarHeight), typeof(double), typeof(CustomProgressBarControl), new PropertyMetadata(5.0));
+        public double ProgressBarHeight
+        {
+            get => (double)GetValue(ProgressBarHeightProperty);
+            set => SetValue(ProgressBarHeightProperty, value);
+        }
+        
+        public CustomProgressBarControl()
+        {
+            InitializeComponent();
+            Grid.DataContext = this;
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+        
+        protected void UpdateProper<T>(ref T properValue,
+            T newValue,
+            [CallerMemberName] string properName = "")
+        {
+            if (object.Equals(properValue, newValue))
+                return;
+
+            properValue = newValue;
+            OnPropertyChanged(properName);
+        }
+    }
+}

+ 61 - 0
Demo/Examples/Compdfkit_Tools/Common/BaseControl/HomePageButton.cs

@@ -0,0 +1,61 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+
+namespace Compdfkit_Tools.Common
+{
+    public class HomePageButton : Button
+    {
+        public static readonly DependencyProperty IsToggledProperty =
+    DependencyProperty.Register("IsToggled", typeof(bool), typeof(HomePageButton), new PropertyMetadata(false));
+
+        public bool IsToggled
+        {
+            get { return (bool)GetValue(IsToggledProperty); }
+            set { SetValue(IsToggledProperty, value); }
+        }
+
+        public static readonly RoutedEvent ToggledEvent = 
+            EventManager.RegisterRoutedEvent("Toggled", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(HomePageButton));
+        public event RoutedEventHandler Toggled
+        {
+            add { AddHandler(ToggledEvent, value); }
+            remove { RemoveHandler(ToggledEvent, value); }
+        }
+
+        public HomePageButton()
+        {
+            Click += HomePageButton_Click; ;
+        }
+
+        public class QueryLockEventArgs : EventArgs
+        {
+            public bool CanLock { get; set; }
+        }
+
+        public delegate bool QueryLockHandler(object sender, QueryLockEventArgs e);
+
+        public event QueryLockHandler QueryLock;
+
+        private void HomePageButton_Click(object sender, RoutedEventArgs e)
+        {
+            if (QueryLock?.Invoke(this, new QueryLockEventArgs()) == false)
+            {
+                IsToggled = !IsToggled;
+                RaiseToggledEvent();
+            }
+        }
+
+        private void RaiseToggledEvent()
+        {
+            RoutedEventArgs newEventArgs = new RoutedEventArgs(ToggledEvent);
+            RaiseEvent(newEventArgs);
+        }
+    }
+}

+ 43 - 0
Demo/Examples/Compdfkit_Tools/Common/BaseControl/MatrixRadioControl.xaml

@@ -0,0 +1,43 @@
+<UserControl x:Class="Compdfkit_Tools.Common.MatrixRadioControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Compdfkit_Tools.Common"
+             mc:Ignorable="d" 
+             Height="92" Width="92">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <local:TagToBoolConverter x:Key="TagToBoolConverter"></local:TagToBoolConverter>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="../../Asset/Styles/RadioButtonStyle.xaml"></ResourceDictionary>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </UserControl.Resources>
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition />
+            <RowDefinition />
+            <RowDefinition />
+        </Grid.RowDefinitions>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition />
+            <ColumnDefinition />
+            <ColumnDefinition />
+        </Grid.ColumnDefinitions>
+        <!-- Row 1 -->
+        <RadioButton Style="{StaticResource MatrixRadioButton}" Grid.Row="0" Grid.Column="0" Tag="0" IsChecked="{Binding SelectedTagValue, ConverterParameter=0, RelativeSource={RelativeSource AncestorType={x:Type local:MatrixRadioControl}}, Converter={StaticResource TagToBoolConverter}}" Checked="RadioButton_Checked"/>
+        <RadioButton Style="{StaticResource MatrixRadioButton}" Grid.Row="0" Grid.Column="1" Tag="1" IsChecked="{Binding SelectedTagValue, ConverterParameter=1, RelativeSource={RelativeSource AncestorType={x:Type local:MatrixRadioControl}}, Converter={StaticResource TagToBoolConverter}}" Checked="RadioButton_Checked"/>
+        <RadioButton Style="{StaticResource MatrixRadioButton}" Grid.Row="0" Grid.Column="2" Tag="2" IsChecked="{Binding SelectedTagValue, ConverterParameter=2, RelativeSource={RelativeSource AncestorType={x:Type local:MatrixRadioControl}}, Converter={StaticResource TagToBoolConverter}}" Checked="RadioButton_Checked"/>
+
+        <!-- Row 2 -->
+        <RadioButton Style="{StaticResource MatrixRadioButton}" Grid.Row="1" Grid.Column="0" Tag="3"  IsChecked="{Binding SelectedTagValue, ConverterParameter=3, RelativeSource={RelativeSource AncestorType={x:Type local:MatrixRadioControl}}, Converter={StaticResource TagToBoolConverter}}" Checked="RadioButton_Checked"/>
+        <RadioButton Style="{StaticResource MatrixRadioButton}" Grid.Row="1" Grid.Column="1" Tag="4"  IsChecked="{Binding SelectedTagValue, ConverterParameter=4, RelativeSource={RelativeSource AncestorType={x:Type local:MatrixRadioControl}}, Converter={StaticResource TagToBoolConverter}}" Checked="RadioButton_Checked"/>
+        <RadioButton Style="{StaticResource MatrixRadioButton}" Grid.Row="1" Grid.Column="2" Tag="5"  IsChecked="{Binding SelectedTagValue, ConverterParameter=5, RelativeSource={RelativeSource AncestorType={x:Type local:MatrixRadioControl}}, Converter={StaticResource TagToBoolConverter}}" Checked="RadioButton_Checked"/>
+
+        <!-- Row 3 -->
+        <RadioButton Style="{StaticResource MatrixRadioButton}" Grid.Row="2" Grid.Column="0" Tag="6"  IsChecked="{Binding SelectedTagValue, ConverterParameter=6, RelativeSource={RelativeSource AncestorType={x:Type local:MatrixRadioControl}}, Converter={StaticResource TagToBoolConverter}}" Checked="RadioButton_Checked"/>
+        <RadioButton Style="{StaticResource MatrixRadioButton}" Grid.Row="2" Grid.Column="1" Tag="7"  IsChecked="{Binding SelectedTagValue, ConverterParameter=7, RelativeSource={RelativeSource AncestorType={x:Type local:MatrixRadioControl}}, Converter={StaticResource TagToBoolConverter}}" Checked="RadioButton_Checked"/>
+        <RadioButton Style="{StaticResource MatrixRadioButton}" Grid.Row="2" Grid.Column="2" Tag="8"  IsChecked="{Binding SelectedTagValue, ConverterParameter=8, RelativeSource={RelativeSource AncestorType={x:Type local:MatrixRadioControl}}, Converter={StaticResource TagToBoolConverter}}" Checked="RadioButton_Checked"/>
+    </Grid>
+</UserControl>

+ 78 - 0
Demo/Examples/Compdfkit_Tools/Common/BaseControl/MatrixRadioControl.xaml.cs

@@ -0,0 +1,78 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Compdfkit_Tools.Common
+{
+    /// <summary>
+    /// Interaction logic for MetrixRadioControl.xaml
+    /// </summary>
+    public partial class MatrixRadioControl : UserControl, INotifyPropertyChanged
+    {
+        public static readonly DependencyProperty SelectedTagProperty =
+    DependencyProperty.Register("SelectedTag", typeof(int), typeof(MatrixRadioControl), new PropertyMetadata(4));
+        public int SelectedTag
+        {
+            get { return (int)GetValue(SelectedTagProperty); }
+            set
+            {
+                SetValue(SelectedTagProperty, value);
+            }
+        }
+
+        private int _selectedTagValue = 4;
+        public int SelectedTagValue
+        {
+            get => _selectedTagValue;
+            set
+            {
+                if (UpdateProper(ref _selectedTagValue, value))
+                {
+                    SelectedTag = value;
+                }
+            }
+        }
+
+        public MatrixRadioControl()
+        {
+            InitializeComponent(); 
+        }
+
+        private void RadioButton_Checked(object sender, RoutedEventArgs e)
+        {
+            var rdo = sender as RadioButton;
+            SelectedTagValue = int.Parse((string)rdo.Tag);
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        protected virtual void OnPropertyChanged(string propertyName = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+
+        protected bool UpdateProper<T>(ref T properValue,
+    T newValue,
+    [CallerMemberName] string properName = "")
+        {
+            if (object.Equals(properValue, newValue))
+                return false;
+
+            properValue = newValue;
+            OnPropertyChanged(properName);
+            return true;
+        }
+    }
+}

+ 9 - 1
Demo/Examples/Compdfkit_Tools/Common/BaseControl/NumericUpDownControl.xaml

@@ -27,6 +27,9 @@
                             <Trigger Property="IsPressed" Value="True">
                                 <Setter Property="Background" Value="#AAAAAA" />
                             </Trigger>
+                            <Trigger Property="IsEnabled" Value="False">
+                                <Setter Property="Opacity" Value="0.5" />
+                            </Trigger>
                         </ControlTemplate.Triggers>
                     </ControlTemplate>
                 </Setter.Value>
@@ -54,7 +57,7 @@
                                     <ColumnDefinition Width="20"></ColumnDefinition>
                                 </Grid.ColumnDefinitions>
                                 <ScrollViewer Grid.Column="0" x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
-                                <TextBlock Grid.Column="1" Text="{Binding Unit, RelativeSource={RelativeSource AncestorType=UserControl}}" VerticalAlignment="Center" Margin="0,0,15,0"/>
+                                <TextBlock Grid.Column="1" Text="{Binding Unit, RelativeSource={RelativeSource AncestorType=UserControl}}" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                                 <Grid Grid.Column="2">
                                     <Grid.RowDefinitions>
                                         <RowDefinition></RowDefinition>
@@ -81,6 +84,11 @@
                                 </Grid>
                             </Grid>
                         </Border>
+                        <ControlTemplate.Triggers>
+                            <Trigger Property="IsEnabled" Value="False">
+                                <Setter Property="Opacity" Value="0.5" />
+                            </Trigger>
+                        </ControlTemplate.Triggers>
                     </ControlTemplate>
                 </Setter.Value>
             </Setter>

+ 29 - 3
Demo/Examples/Compdfkit_Tools/Common/BaseControl/NumericUpDownControl.xaml.cs

@@ -1,4 +1,5 @@
-using System.Text.RegularExpressions;
+using System;
+using System.Text.RegularExpressions;
 using System.Windows;
 using System.Windows.Controls;
 using System.Windows.Input;
@@ -7,7 +8,8 @@ namespace Compdfkit_Tools.Common
 {
     public partial class NumericUpDownControl : UserControl
     {
-        private string regixString = "[^0-9]+";
+        private string regixString = "[^0-9-]";
+        private string nRegixString = @"[^0-9-]+";
 
         // The dependency property which will be accessible on the UserControl
         public static readonly DependencyProperty UnitProperty =
@@ -50,7 +52,15 @@ namespace Compdfkit_Tools.Common
         }
         private void TextBox_PreviewTextInput(object sender, TextCompositionEventArgs e)
         {
-            e.Handled = new Regex(regixString).IsMatch(e.Text);
+            if (Minimum > 0)
+            {
+                e.Handled = new Regex(regixString).IsMatch(e.Text);
+            }
+            else
+            {
+                e.Handled = new Regex(nRegixString).IsMatch(e.Text);
+
+            }
         }
 
         private void TextBox_PreviewKeyDown(object sender, KeyEventArgs e)
@@ -61,6 +71,18 @@ namespace Compdfkit_Tools.Common
                 e.Handled = false;
         }
 
+        public static int GetMinAbsoluteValue(int min, int max)
+        {
+            if (min <= 0 && max >= 0)
+            {
+                return 0;
+            }
+            else
+            {
+                return Math.Abs(min) < Math.Abs(max) ? min : max;
+            }
+        }
+
         private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
         {
             if (!string.IsNullOrEmpty(TextBox.Text))
@@ -75,6 +97,10 @@ namespace Compdfkit_Tools.Common
                     TextBox.Text = Minimum.ToString();
                 }
             }
+            else
+            {
+                TextBox.Text = GetMinAbsoluteValue(Minimum, Maxium).ToString();
+            }
         }
 
         private void UpButton_Click(object sender, RoutedEventArgs e)

+ 25 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/AndMultiBoolValueConverter.cs

@@ -0,0 +1,25 @@
+using System;
+using System.Globalization;
+using System.Linq;
+using System.Windows;
+using System.Windows.Data;
+
+namespace Compdfkit_Tools.Common
+{
+    public class AndMultiBoolValueConverter : IMultiValueConverter
+    {
+        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (values != null && values.All(v => v is bool boolValue))
+            {
+                return values.Cast<bool>().All(v => v);
+            }
+            return DependencyProperty.UnsetValue; 
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+        {
+            return Enumerable.Repeat(DependencyProperty.UnsetValue, targetTypes.Length).ToArray();
+        }
+    }
+}

+ 34 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/AntiBoolToVisibilityConverter.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows;
+
+namespace Compdfkit_Tools.Common
+{
+    [ValueConversion(typeof(bool), typeof(Visibility))]
+    class AntiBoolToVisibilityConverter : IValueConverter
+    {
+        #region IValueConverter Members
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if ((bool)value == false)
+            {
+                return Visibility.Visible;
+            }
+            else
+            {
+                return Visibility.Hidden;
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            return null;
+        }
+        #endregion
+    }
+}

+ 34 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/AntiStringToVisibilityConverter.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows;
+
+namespace Compdfkit_Tools.Common
+{
+    [ValueConversion(typeof(string), typeof(Visibility))]
+    class AntiStringToVisibilityConverter : IValueConverter
+    {
+        #region IValueConverter Members
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if ((value as string) != string.Empty)
+            {
+                return Visibility.Visible;
+            }
+            else
+            {
+                return Visibility.Collapsed;
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            return null;
+        }
+        #endregion
+    }
+}

+ 41 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/BoolToColorConverter.cs

@@ -0,0 +1,41 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows;
+using System.Drawing;
+using System.Globalization;
+using System.Windows.Media;
+
+namespace Compdfkit_Tools.Common
+{
+    /// <summary>
+    /// Value converter between bool and Brushes
+    /// </summary>
+    [ValueConversion(typeof(bool), typeof(SolidColorBrush))]
+    public class BoolToColorConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is bool boolValue)
+            {
+                if (boolValue)
+                {
+                    return new SolidColorBrush(Colors.Black);
+                }
+                else
+                {
+                    return new SolidColorBrush(Colors.White);
+                }
+            }
+            return new SolidColorBrush(Colors.Black);; 
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotImplementedException(); 
+        }
+    }
+}

+ 1 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/BoolToVisibilityConverter.cs

@@ -28,6 +28,7 @@ namespace Compdfkit_Tools.Common
             object parameter,
             CultureInfo culture)
         {
+
             if ((bool)value)
             {
                 return Visibility.Visible;

+ 8 - 1
Demo/Examples/Compdfkit_Tools/Common/Convert/CaptionHeightConverter.cs

@@ -8,7 +8,14 @@ namespace Compdfkit_Tools.Common
     {
         public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
         {
-            return (double)values[0] + (double)values[1];
+            try
+            {
+                return (double)values[0] + (double)values[1];
+            }
+            catch
+            {
+                return 6.0;
+            }
         }
 
         public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)

+ 28 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/HeightToTopMarginConverter.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace Compdfkit_Tools.Common
+{
+    public class HeightToTopMarginConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is double height)
+            {
+                return new Thickness(0, height + 3, 0, 0);
+            }
+            return new Thickness(0);
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+}

+ 31 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/HomePageFileListHeightConverter.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Compdfkit_Tools.Common
+{
+    public class HomePageFileListHeightConverter : IMultiValueConverter
+    {
+        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (values[0] == null || values[1] == null)
+            {
+                return false;
+            }
+            else
+            {
+                var value = (double)values[0] - (double)values[1] - 32;
+                return (value >= 200.0) ? value : 200.0;
+            }
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+        {
+            return null;
+        }
+    }
+}

+ 28 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/HomePageHeightConverter.cs

@@ -0,0 +1,28 @@
+using System;
+using System.Globalization;
+using System.Linq;
+using System.Windows;
+using System.Windows.Data;
+
+namespace Compdfkit_Tools.Common
+{
+    public class HomePageHeightConverter : IMultiValueConverter
+    {
+        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (values[0] == null || values[1] == null)
+            {
+                return false;
+            }
+            else
+            {
+                return (double)values[0] - (double)values[1];
+            }
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+        {
+            return null;
+        }
+    }
+}

+ 154 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/LanguageResourceConverter.cs

@@ -0,0 +1,154 @@
+using System;
+using System.Globalization;
+using System.Resources;
+using System.Windows.Data;
+using Compdfkit_Tools.Helper;
+
+namespace Compdfkit_Tools.Common
+{
+
+
+    public class BotaResourceConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (parameter == null || string.IsNullOrEmpty(parameter.ToString()))
+            {
+                return string.Empty;
+            }
+
+            return LanguageHelper.BotaManager.GetString(parameter.ToString());
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+
+    public class CommonResourceConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (parameter == null || string.IsNullOrEmpty(parameter.ToString()))
+            {
+                return string.Empty;
+            }
+
+            return LanguageHelper.CommonManager.GetString(parameter.ToString());
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+
+    public class PropertyPanelResourceConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (parameter == null || string.IsNullOrEmpty(parameter.ToString()))
+            {
+                return string.Empty;
+            }
+
+            return LanguageHelper.PropertyPanelManager.GetString(parameter.ToString());
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+
+    public class ToolBarResourceConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (parameter == null || string.IsNullOrEmpty(parameter.ToString()))
+            {
+                return string.Empty;
+            }
+
+            return LanguageHelper.ToolBarManager.GetString(parameter.ToString());
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+
+    public class SigResourceConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (parameter == null || string.IsNullOrEmpty(parameter.ToString()))
+            {
+                return string.Empty;
+            }
+
+            return LanguageHelper.SigManager.GetString(parameter.ToString());
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+    
+    public class DocInfoResourceConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (parameter == null || string.IsNullOrEmpty(parameter.ToString()))
+            {
+                return string.Empty;
+            }
+
+            return LanguageHelper.DocInfoManager.GetString(parameter.ToString());
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+    
+    public class SecurityResourceConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (parameter == null || string.IsNullOrEmpty(parameter.ToString()))
+            {
+                return string.Empty;
+            }
+
+            return LanguageHelper.SecurityManager.GetString(parameter.ToString());
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+    
+    public class DocEditorResourceConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (parameter == null || string.IsNullOrEmpty(parameter.ToString()))
+            {
+                return string.Empty;
+            }
+
+            return LanguageHelper.DocEditorManager.GetString(parameter.ToString());
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            throw new NotSupportedException();
+        }
+    }
+}

+ 7 - 2
Demo/Examples/Compdfkit_Tools/Common/Convert/ReverseBoolConverter.cs

@@ -10,12 +10,17 @@ namespace Compdfkit_Tools.Common
     {
         public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
         {
-            return (bool)value != true;
+            return value != null && (bool)value != true;
         }
 
         public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
         {
-            return null;
+            if (value is bool b)
+            {
+                return !b;
+            }
+
+            return value;
         }
     }
 }

+ 26 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/ShowDefaultCloseButtonConverter.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace Compdfkit_Tools.Common
+{
+    public class ShowDefaultCloseButtonConverter : IMultiValueConverter
+    {
+        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+        {
+            var Visible = ( (values[1] == DependencyProperty.UnsetValue ? 0 : (int)values[1]) >=
+                (values[0] == DependencyProperty.UnsetValue ? 0 : (int)values[0]) ? Visibility.Visible : Visibility.Collapsed);
+            return Visible;
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+        {
+            return null;
+        }
+    }
+}

+ 26 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/ShowIconConverter.cs

@@ -0,0 +1,26 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Data;
+
+namespace Compdfkit_Tools.Common
+{
+    public class ShowIconConverter: IMultiValueConverter
+    {
+        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
+        {
+            var Visible = ((values[1] == DependencyProperty.UnsetValue ? 0 : (int)values[1]) >=
+                (values[0] == DependencyProperty.UnsetValue ? 0 : (int)values[0]) ? Visibility.Collapsed : Visibility.Visible );
+            return Visible;
+        }
+
+        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
+        {
+            return null;
+        }
+    }
+}

+ 35 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/StringToVisibilityConverter.cs

@@ -0,0 +1,35 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+using System.Windows;
+
+namespace Compdfkit_Tools.Common
+{
+    [ValueConversion(typeof(string), typeof(Visibility))]
+    class StringToVisibilityConverter : IValueConverter
+    {
+        #region IValueConverter Members
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if ((value as string) == string.Empty)
+            {
+                return Visibility.Visible;
+            }
+            else
+            {
+                return Visibility.Collapsed;
+            }
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            return null;
+        }
+        #endregion
+
+    }
+}

+ 34 - 0
Demo/Examples/Compdfkit_Tools/Common/Convert/TagToBoolConverter.cs

@@ -0,0 +1,34 @@
+using System;
+using System.Collections.Generic;
+using System.Globalization;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows.Data;
+
+namespace Compdfkit_Tools.Common
+{
+    public class TagToBoolConverter : IValueConverter
+    {
+        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is int v && parameter is string v1)
+            {
+                if (int.TryParse(v1, out int parameterValue))
+                {
+                    return v == parameterValue;
+                }
+            }
+            return false;
+        }
+
+        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+        {
+            if (value is bool && parameter is int && (bool)value)
+            {
+                return (int)parameter;
+            }
+            return Binding.DoNothing;
+        }
+    }
+}

+ 1 - 1
Demo/Examples/Compdfkit_Tools/Common/Convert/WindowStateToThicknessConverter.cs

@@ -18,7 +18,7 @@ namespace Compdfkit_Tools.Common
             else
             {
                 // left, right and bottom borders are still drawn by the system
-                return new Thickness(0, 1, 0, 0);
+                return new Thickness(1);
             }
         }
 

+ 66 - 0
Demo/Examples/Compdfkit_Tools/Common/CreateBlankPageSetting/CreateBlankPageSettingDialog.xaml

@@ -0,0 +1,66 @@
+<Window x:Class="Compdfkit_Tools.PDFControl.CreateBlankPageSettingDialog"
+        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+        xmlns:local="clr-namespace:Compdfkit_Tools.PDFControl"
+        xmlns:common="clr-namespace:Compdfkit_Tools.Common"
+        mc:Ignorable="d"
+        ResizeMode="NoResize"
+        ShowInTaskbar="False"
+        WindowStartupLocation="CenterScreen"
+        Height="370" Width="386">
+    <Window.Resources>
+        <ResourceDictionary>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="../../Asset/Styles/RadioButtonStyle.xaml"></ResourceDictionary>
+            </ResourceDictionary.MergedDictionaries>
+            <common:CommonResourceConverter x:Key="CommonResourceConverter"></common:CommonResourceConverter>
+        </ResourceDictionary>
+    </Window.Resources>
+    <Grid Margin="10,20,5,0">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="154"></RowDefinition>
+            <RowDefinition Height="104"></RowDefinition>
+            <RowDefinition Height="40"></RowDefinition>
+        </Grid.RowDefinitions>
+        <Grid Background="White" Margin="20,0,0,0"  Panel.ZIndex="1" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top">
+            <TextBlock Foreground="#001A4E" FontFamily="Microsoft YaHei" Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Subtitle_PageSize}" FontWeight="DemiBold" FontSize="14"></TextBlock>
+        </Grid>
+        <Border Margin="0,10,7,12" BorderBrush="#33000000" BorderThickness="1">
+            <Grid Margin="10,10,10,10" VerticalAlignment="Center" Height="{Binding Path=ActualHeight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Border}}}">
+                <Grid.RowDefinitions>
+                    <RowDefinition></RowDefinition>
+                    <RowDefinition></RowDefinition>
+                    <RowDefinition></RowDefinition>
+                </Grid.RowDefinitions>
+                <RadioButton x:Name="A3Rdo" Margin="0,10,0,0" VerticalAlignment="Center" FontFamily="Microsoft YaHei" FontSize="14" 
+                             Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Option_A3}"></RadioButton>
+                <RadioButton Grid.Row="1" x:Name="A4Rdo" IsChecked="True" VerticalAlignment="Center" FontFamily="Microsoft YaHei" FontSize="14" 
+                             Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Option_A4}"></RadioButton>
+                <RadioButton Grid.Row="2" x:Name="A5Rdo" Margin="0,0,0,10" VerticalAlignment="Center" FontFamily="Microsoft YaHei" FontSize="14"
+                             Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Option_A5}"></RadioButton>
+            </Grid>
+        </Border>
+        
+        <Grid Grid.Row="1" Background="White" Margin="20,0,0,0"  Panel.ZIndex="1" Height="20" HorizontalAlignment="Left" VerticalAlignment="Top">
+            <TextBlock Foreground="#001A4E" FontFamily="Microsoft YaHei" Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Subtitle_Orientation}" FontWeight="DemiBold" FontSize="14"></TextBlock>
+        </Grid>
+        <Border Grid.Row="1" Margin="0,10,7,12" BorderBrush="#33000000" BorderThickness="1">
+            <Grid Margin="10" VerticalAlignment="Center" Height="{Binding Path=ActualHeight, RelativeSource={RelativeSource Mode=FindAncestor, AncestorType={x:Type Border}}}">
+                <Grid.RowDefinitions>
+                    <RowDefinition></RowDefinition>
+                    <RowDefinition></RowDefinition>
+                </Grid.RowDefinitions>
+                <RadioButton x:Name="HorizontalRdo" Margin="0,10,0,0" VerticalAlignment="Center" FontFamily="Microsoft YaHei" FontSize="14"
+                             Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Option_Landscape}"></RadioButton>
+                <RadioButton Grid.Row="1" x:Name="VerticalRdo" Margin="0,0,0,10" IsChecked="True" VerticalAlignment="Center" FontFamily="Microsoft YaHei" FontSize="14"
+                             Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Option_Portrait}"></RadioButton>
+            </Grid>
+        </Border>
+        <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
+            <Button Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Button_Cancel}" Width="112" Height="32" FontFamily="Microsoft YaHei" FontSize="14" Click="Cancel_Click"></Button>
+            <Button Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Button_OK}" Width="112" Height="32" FontFamily="Microsoft YaHei" FontSize="14" Margin="10,0,10,0" Click="Confirm_Click"></Button>
+        </StackPanel>
+    </Grid>
+</Window>

+ 60 - 0
Demo/Examples/Compdfkit_Tools/Common/CreateBlankPageSetting/CreateBlankPageSettingDialog.xaml.cs

@@ -0,0 +1,60 @@
+using System;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Forms.VisualStyles;
+using Compdfkit_Tools.Helper;
+
+namespace Compdfkit_Tools.PDFControl
+{
+
+    public class BlankPageSetting
+    {
+        public Size Size { get; set; } = new Size(210, 297);
+        public Orientation Orientation { get; set; } = Orientation.Vertical;
+    }
+
+    public partial class CreateBlankPageSettingDialog : Window
+    {
+        public event EventHandler<BlankPageSetting> CreateBlankPage;
+
+        public CreateBlankPageSettingDialog()
+        {
+            InitializeComponent();
+            Title = LanguageHelper.CommonManager.GetString("Title_NewFile");
+        }
+
+        private void Cancel_Click(object sender, RoutedEventArgs e)
+        {
+            Close();
+        }
+
+        private void Confirm_Click(object sender, RoutedEventArgs e)
+        {
+            var blankPageSetting = new BlankPageSetting
+            {
+                Size = GetSettingSize(),
+                Orientation = GetSettingOrientation()
+            };
+            CreateBlankPage?.Invoke(this, blankPageSetting);
+            Close();
+        }
+
+        private Orientation GetSettingOrientation()
+        {
+            return HorizontalRdo.IsChecked == true ? Orientation.Horizontal : Orientation.Vertical;
+        }
+
+        private Size GetSettingSize()
+        {
+            if (A3Rdo.IsChecked == true)
+                return new Size(297, 420);
+            if (A4Rdo.IsChecked == true)
+                return new Size(210, 297);
+            if (A5Rdo.IsChecked == true)
+                return new Size(148, 219);
+
+            return new Size(210, 297);
+
+        }
+    }
+}

+ 216 - 79
Demo/Examples/Compdfkit_Tools/Common/Helper/CommonHelper.cs

@@ -21,6 +21,14 @@ using ComPDFKit.DigitalSign;
 using ComPDFKit.PDFAnnotation.Form;
 using Point = System.Windows.Point;
 using Size = System.Windows.Size;
+using System.Collections.ObjectModel;
+using Brush = System.Windows.Media.Brush;
+using Color = System.Windows.Media.Color;
+using System.Drawing.Drawing2D;
+using Matrix = System.Windows.Media.Matrix;
+using System.Drawing.Imaging;
+using System.Runtime.InteropServices;
+using ComPDFKit.NativeMethod;
 
 namespace Compdfkit_Tools.Helper
 {
@@ -51,6 +59,65 @@ namespace Compdfkit_Tools.Helper
 
     public static class CommonHelper
     {
+        public static bool IsImageCorrupted(string imagePath)
+        {
+            try
+            {
+                using (Bitmap bitmap = new Bitmap(imagePath))
+                {
+                    int width = bitmap.Width;
+                    int height = bitmap.Height;
+                }
+
+                return false;
+            }
+            catch (Exception)
+            {
+                MessageBox.Show(LanguageHelper.CommonManager.GetString("Text_ImageCorrupted"), LanguageHelper.CommonManager.GetString("Button_OK"), MessageBoxButton.OK);
+                return true;
+            }
+        }
+
+        public static Bitmap ConvertTo32bppArgb(Bitmap source)
+        {
+            // Create a new Bitmap with 32bppArgb pixel format
+            Bitmap newBitmap = new Bitmap(source.Width, source.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
+
+            // Create a Graphics object to draw the source image on the new Bitmap
+            using (Graphics g = Graphics.FromImage(newBitmap))
+            {
+                // Set the interpolation mode and pixel offset mode for high-quality rendering
+                g.InterpolationMode = InterpolationMode.HighQualityBicubic;
+                g.PixelOffsetMode = PixelOffsetMode.HighQuality;
+                g.SmoothingMode = SmoothingMode.HighQuality;
+
+                // Draw the source image on the new Bitmap
+                g.DrawImage(source, new System.Drawing.Rectangle(0, 0, source.Width, source.Height));
+            }
+            return newBitmap;
+        }
+
+        public static byte[] ConvertBrushToByteArray(Brush brush)
+        {
+            if (brush is SolidColorBrush solidColorBrush)
+            {
+                Color color = solidColorBrush.Color;
+
+                byte[] colorBytes = new byte[3];
+                colorBytes[0] = color.R;
+                colorBytes[1] = color.G;
+                colorBytes[2] = color.B;
+
+                return colorBytes;
+            }
+            else
+            {
+                throw new ArgumentException("The provided brush is not a SolidColorBrush.");
+            }
+        }
+
+
+
         public static int GetBitmapPointer(Bitmap bitmap)
         {
             IntPtr hBitmap = bitmap.GetHbitmap();
@@ -93,7 +160,7 @@ namespace Compdfkit_Tools.Helper
             string second = date.Substring(12, 2);
             return new DateTime(int.Parse(year), int.Parse(month), int.Parse(day), int.Parse(hour), int.Parse(minute), int.Parse(second));
         }
-        
+
         /// <summary>
         /// Returns the file size based on the specified file path, with the smallest unit being bytes (B).
         /// </summary>
@@ -122,7 +189,7 @@ namespace Compdfkit_Tools.Helper
                 return "0B";
             }
         }
-         
+
         public static string GetExistedPathOrEmpty(string filter = "PDF files (*.pdf)|*.pdf")
         {
             string selectedFilePath = string.Empty;
@@ -146,7 +213,7 @@ namespace Compdfkit_Tools.Helper
             }
             return selectedFilePath;
         }
-          
+
         public static string GetGeneratePathOrEmpty(string filter, string defaultFileName = "")
         {
             string selectedFilePath = string.Empty;
@@ -162,75 +229,145 @@ namespace Compdfkit_Tools.Helper
             return selectedFilePath;
         }
 
+        public static string GetPageParmFromList(List<int> pagesList)
+        {
+            string pageParam = "";
+            if (pagesList.Count != 0)
+            {
+                pagesList.Sort();
+
+                for (int i = 0; i < pagesList.Count; i++)
+                {
+                    if (i == 0)
+                    {
+                        pageParam += pagesList[0].ToString();
+                    }
+                    else
+                    {
+                        if (pagesList[i] == pagesList[i - 1] + 1)
+                        {
+                            if (i >= 2)
+                            {
+                                if (pagesList[i - 1] != pagesList[i - 2] + 1)
+                                    pageParam += "-";
+                            }
+                            else
+                                pageParam += "-";
+
+                            if (i == pagesList.Count - 1)
+                            {
+                                pageParam += pagesList[i].ToString();
+                            }
+                        }
+                        else
+                        {
+                            if (i >= 2)
+                            {
+                                if (pagesList[i - 1] == pagesList[i - 2] + 1)
+                                    pageParam += pagesList[i - 1].ToString();
+                            }
+                            pageParam += "," + pagesList[i].ToString();
+                        }
+                    }
+                }
+            }
+            return pageParam;
+        }
+
+        public static List<int> GetDefaultPageList(CPDFDocument document)
+        {
+            List<int> pageRangeList = new List<int>();
+            for (int i = 0; i < document.PageCount; i++)
+            {
+                pageRangeList.Add(i + 1);
+            }
+            return pageRangeList;
+        }
+
         public static bool GetPagesInRange(ref List<int> pageList, string pageRange, int count, char[] enumerationSeparator, char[] rangeSeparator, bool inittag = false)
         {
-            string[] rangeSplit = pageRange.Split(enumerationSeparator); 
+            if (pageRange == null || pageList == null)
+            {
+                return false;
+            }
 
             pageList.Clear();
+            int starttag = inittag ? 0 : 1;
+
+            string[] rangeSplit = pageRange.Split(enumerationSeparator);
 
             foreach (string range in rangeSplit)
             {
-                int starttag = 1;
-                if (inittag)
-                {
-                    starttag = 0;
-                }
-                if (range.Contains("-")) 
+                if (range.Contains("-"))
                 {
-                    try
+                    string[] limits = range.Split(rangeSeparator);
+                    if (limits.Length == 2 && int.TryParse(limits[0], out int start) && int.TryParse(limits[1], out int end))
                     {
-                        string[] limits = range.Split(rangeSeparator); 
-                        if (limits.Length >= 2 && !string.IsNullOrWhiteSpace(limits[0]) && !string.IsNullOrWhiteSpace(limits[1]))
+                        if (start < starttag || end > count || start > end)
                         {
-                            int start = int.Parse(limits[0]);
-                            int end = int.Parse(limits[1]);
+                            return false;
+                        }
 
-                            if ((start < starttag) || (end > count) || (start > end))
-                            { 
+                        for (int i = start; i <= end; i++)
+                        {
+                            if (pageList.Contains(i - 1))
+                            {
                                 return false;
                             }
 
-                            for (int i = start; i <= end; ++i)
-                            {
-                                if (pageList.Contains(i))
-                                { 
-                                    return false;
-                                }
-
-                                pageList.Add(i - 1);
-                            }
-                            continue;
+                            pageList.Add(i - 1);
                         }
                     }
-                    catch (Exception ex)
-                    { 
+                    else
+                    {
                         return false;
                     }
                 }
-                int pageNr;
-                try
-                { 
-                    pageNr = int.Parse(range); 
-                }
-                catch (Exception) 
+                else if (int.TryParse(range, out int pageNr))
                 {
-                    return false;
-                }
-                if (pageNr < starttag || pageNr > count)
-                {
-                    return false; 
+                    if (pageNr < starttag || pageNr > count)
+                    {
+                        return false;
+                    }
+
+                    if (pageList.Contains(pageNr - 1))
+                    {
+                        return false;
+                    }
+
+                    pageList.Add(pageNr - 1);
                 }
-                if (pageList.Contains(pageNr))
+                else
                 {
-                    return false; 
+                    return false;
                 }
-                pageList.Add(pageNr - 1);
             }
             return true;
         }
 
+        internal static byte[] ConvertBitmapToByteArray(Bitmap bitmap)
+        {
+            BitmapData bmpdata = null;
+            try
+            {
+                bmpdata = bitmap.LockBits(new System.Drawing.Rectangle(0, 0, bitmap.Width, bitmap.Height), ImageLockMode.ReadOnly, bitmap.PixelFormat);
+                int numbytes = bmpdata.Stride * bitmap.Height;
+                byte[] bytedata = new byte[numbytes];
+                IntPtr ptr = bmpdata.Scan0;
+
+                Marshal.Copy(ptr, bytedata, 0, numbytes);
+
+                return bytedata;
+            }
+            finally
+            {
+                if (bmpdata != null)
+                    bitmap.UnlockBits(bmpdata);
+            }
+        }
+
         internal static class PageEditHelper
-        { 
+        {
             public static T FindVisualParent<T>(DependencyObject obj) where T : class
             {
                 while (obj != null)
@@ -311,7 +448,7 @@ namespace Compdfkit_Tools.Helper
         }
 
         public class ArrowHelper
-        { 
+        {
             public bool HasStartArrow
             {
                 get
@@ -322,7 +459,7 @@ namespace Compdfkit_Tools.Helper
                     }
                     return false;
                 }
-            } 
+            }
 
             public bool IsStartClosed
             {
@@ -334,7 +471,7 @@ namespace Compdfkit_Tools.Helper
                     }
                     return false;
                 }
-            } 
+            }
 
             public bool HasEndArrow
             {
@@ -346,7 +483,7 @@ namespace Compdfkit_Tools.Helper
                     }
                     return false;
                 }
-            } 
+            }
 
             public bool IsEndClosed
             {
@@ -358,15 +495,15 @@ namespace Compdfkit_Tools.Helper
                     }
                     return false;
                 }
-            } 
-
-            public uint ArrowAngle { get; set; } 
-            public uint ArrowLength { get; set; } 
-            public Point? LineStart { get; set; } 
-            public Point? LineEnd { get; set; } 
-            public PathGeometry Body { get; set; } 
-            public C_LINE_TYPE StartSharp { get; set; } 
-            public C_LINE_TYPE EndSharp { get; set; } 
+            }
+
+            public uint ArrowAngle { get; set; }
+            public uint ArrowLength { get; set; }
+            public Point? LineStart { get; set; }
+            public Point? LineEnd { get; set; }
+            public PathGeometry Body { get; set; }
+            public C_LINE_TYPE StartSharp { get; set; }
+            public C_LINE_TYPE EndSharp { get; set; }
             public ArrowHelper()
             {
                 Body = new PathGeometry();
@@ -377,10 +514,10 @@ namespace Compdfkit_Tools.Helper
             {
                 if (LineStart != null && LineEnd != null)
                 {
-                    PathFigure lineFigure = new PathFigure(); 
+                    PathFigure lineFigure = new PathFigure();
                     lineFigure.StartPoint = (Point)LineStart;
                     LineSegment linePath = new LineSegment();
-                    linePath.Point = (Point)LineEnd; 
+                    linePath.Point = (Point)LineEnd;
                     lineFigure.Segments.Add(linePath);
                     return lineFigure;
                 }
@@ -441,7 +578,7 @@ namespace Compdfkit_Tools.Helper
                         break;
                 }
                 return null;
-            } 
+            }
 
             public PathGeometry BuildArrowBody()
             {
@@ -463,7 +600,7 @@ namespace Compdfkit_Tools.Helper
                 }
                 return Body;
             }
-             
+
             private PathFigure CreateStartOpenArrow()
             {
                 if (ArrowLength == 0 || !HasStartArrow || LineStart == null || LineEnd == null || ArrowAngle == 0)
@@ -485,7 +622,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.IsClosed = IsStartClosed;
                 arrowFigure.IsFilled = IsStartClosed;
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateEndOpenArrow()
             {
@@ -508,7 +645,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.IsClosed = IsEndClosed;
                 arrowFigure.IsFilled = IsEndClosed;
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateStartReverseArrow()
             {
@@ -531,7 +668,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.IsClosed = IsStartClosed;
                 arrowFigure.IsFilled = IsStartClosed;
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateEndReverseArrow()
             {
@@ -555,7 +692,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.IsFilled = IsEndClosed;
                 return arrowFigure;
             }
-             
+
             private PathFigure CreateStartButtArrow()
             {
                 if (ArrowLength == 0 || !HasStartArrow || LineStart == null || LineEnd == null)
@@ -574,7 +711,7 @@ namespace Compdfkit_Tools.Helper
                 buttSegment.Point = ((Point)LineStart + (lineVector * rotateMatrix));
                 arrowFigure.Segments.Add(buttSegment);
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateEndButtArrow()
             {
@@ -595,7 +732,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.Segments.Add(buttSegment);
 
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateStartDiamondArrow()
             {
@@ -634,7 +771,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.IsClosed = IsStartClosed;
                 arrowFigure.IsFilled = IsStartClosed;
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateEndDiamondArrow()
             {
@@ -674,7 +811,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.IsClosed = IsEndClosed;
                 arrowFigure.IsFilled = IsEndClosed;
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateStartRoundArrow()
             {
@@ -701,7 +838,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.Segments.Add(circleSegment);
 
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateEndRoundArrow()
             {
@@ -728,7 +865,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.Segments.Add(circleSegment);
 
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateStartSquareArrow()
             {
@@ -762,7 +899,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.Segments.Add(squreSegment);
 
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateEndSquareArrow()
             {
@@ -797,7 +934,7 @@ namespace Compdfkit_Tools.Helper
                 arrowFigure.Segments.Add(squreSegment);
 
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateStartSlashArrow()
             {
@@ -817,7 +954,7 @@ namespace Compdfkit_Tools.Helper
                 buttSegment.Point = ((Point)LineStart + (lineVector * rotateMatrix));
                 arrowFigure.Segments.Add(buttSegment);
                 return arrowFigure;
-            } 
+            }
 
             private PathFigure CreateEndSlashArrow()
             {
@@ -956,7 +1093,7 @@ namespace Compdfkit_Tools.Helper
             }
         }
 
-        public static void ExtraImage_Click(Dictionary<int,List<Bitmap>> imageDict)
+        public static void ExtraImage_Click(Dictionary<int, List<Bitmap>> imageDict)
         {
             System.Windows.Forms.FolderBrowserDialog folderDialog = new System.Windows.Forms.FolderBrowserDialog();
             if (folderDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
@@ -986,7 +1123,7 @@ namespace Compdfkit_Tools.Helper
                 }
             }
         }
-        
+
         public static double CheckZoomLevel(double[] zoomLevelList, double zoom, bool IsGrowth)
         {
             double standardZoom = 100;
@@ -1020,11 +1157,11 @@ namespace Compdfkit_Tools.Helper
     public class SignatureHelper
     {
         public static List<CPDFSignature> SignatureList;
-        
+
         public static void InitEffectiveSignatureList(CPDFDocument document)
         {
             SignatureList = document.GetSignatureList();
-            for(int index = SignatureList.Count - 1; index >= 0; index--)
+            for (int index = SignatureList.Count - 1; index >= 0; index--)
             {
                 if (SignatureList[index].SignerList.Count <= 0)
                 {
@@ -1039,7 +1176,7 @@ namespace Compdfkit_Tools.Helper
             {
                 sig.VerifySignatureWithDocument(document);
             }
-            
+
         }
     }
 }

+ 154 - 0
Demo/Examples/Compdfkit_Tools/Common/Helper/FileHistoryHelper.cs

@@ -0,0 +1,154 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Management.Instrumentation;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Xml.Serialization;
+
+namespace Compdfkit_Tools.Helper
+{
+    public interface IHasFileHistory
+    {
+        string FilePath { get; set; }
+    }
+
+    [Serializable]
+    public class PDFFileInfo : IHasFileHistory
+    {
+        public string FilePath { get; set; } = string.Empty;
+        public string FileSize { get; set; } = string.Empty;    
+        public string FileName { get; set; } = string.Empty;
+        public string OpenDate { get; set; } = string.Empty;
+    }
+
+    public class FileHistoryHelper<T> : INotifyPropertyChanged where T: class, IHasFileHistory
+    {
+
+        private ObservableCollection<T> _history;
+
+        public ObservableCollection<T> History
+        {
+            get => _history;
+            set
+            {
+                _history = value;
+                UpdateProper(ref _history, value);
+            }
+        }
+
+        private static FileHistoryHelper<T> instance;
+        public static FileHistoryHelper<T> Instance
+        {
+            get
+            {
+                if (instance == null)
+                {
+                    instance = new FileHistoryHelper<T>();
+                }
+                return instance;
+            }
+        }
+
+        public int DefaultHistoryCount { get; private set; } = int.MaxValue;
+        public string DefaultFilePath { get; private set; } = string.Empty;
+
+        private FileHistoryHelper()
+        {
+            History = new ObservableCollection<T>();
+            DefaultFilePath = "History.xml";
+            DefaultHistoryCount = 10;
+        }
+
+        public void AddHistory(T item)
+        {
+            if (item == null)
+            {
+                return;
+            }
+            T existingItem = History.FirstOrDefault(i => i.FilePath == item.FilePath);
+
+            if (existingItem != null)
+            {
+                History.Remove(existingItem);
+            }
+            History.Insert(0, item);
+        
+            if (History.Count > DefaultHistoryCount)
+            {
+                History.RemoveAt(History.Count - 1);
+            }
+        }
+
+        public void SaveHistory(string filePath = "")
+        {
+            if (string.IsNullOrEmpty(filePath))
+            {
+                filePath = DefaultFilePath;
+            }
+
+            try
+            {
+                using (FileStream fs = new FileStream(filePath, FileMode.Create))
+                {
+                    XmlSerializer serializer = new XmlSerializer(typeof(ObservableCollection<T>));
+                    serializer.Serialize(fs, History);
+                }
+            }
+            catch (Exception ex)
+            {
+                ClearHistory();
+                if (!string.IsNullOrEmpty(filePath) && File.Exists(filePath))
+                {
+                    File.Delete(filePath);
+                }
+            }
+        }
+
+        public void LoadHistory(string filePath = "")
+        {
+            if (string.IsNullOrEmpty(filePath))
+            {
+                filePath = DefaultFilePath;
+            }
+
+            try
+            {
+                using (FileStream fs = new FileStream(filePath, FileMode.Open))
+                {
+                    XmlSerializer serializer = new XmlSerializer(typeof(ObservableCollection<T>));
+                    History = (ObservableCollection<T>)serializer.Deserialize(fs);
+                }
+            }
+            catch (Exception ex)
+            {
+                ClearHistory();
+                if (!string.IsNullOrEmpty(filePath) && File.Exists(filePath))
+                {
+                    File.Delete(filePath);
+                }
+            }
+        }
+
+        public void ClearHistory()
+        {
+            History.Clear();
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        protected void UpdateProper<T>(ref T properValue,
+                            T newValue,
+                            [CallerMemberName] string properName = "")
+        {
+            properValue = newValue;
+            OnPropertyChanged(properName);
+        }
+
+        protected void OnPropertyChanged([CallerMemberName] string propertyName = "") =>
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+    }
+}

+ 17 - 0
Demo/Examples/Compdfkit_Tools/Common/Helper/LanguageHelper.cs

@@ -0,0 +1,17 @@
+using System.Reflection;
+using System.Resources;
+
+namespace Compdfkit_Tools.Helper
+{
+    public abstract class LanguageHelper
+    {
+		public static ResourceManager BotaManager= new ResourceManager("Compdfkit_Tools.Strings.Bota", Assembly.GetExecutingAssembly());
+        public static ResourceManager CommonManager= new ResourceManager("Compdfkit_Tools.Strings.Common", Assembly.GetExecutingAssembly());
+        public static ResourceManager PropertyPanelManager= new ResourceManager("Compdfkit_Tools.Strings.PropertyPanel", Assembly.GetExecutingAssembly());
+        public static ResourceManager ToolBarManager= new ResourceManager("Compdfkit_Tools.Strings.ToolBar", Assembly.GetExecutingAssembly());
+        public static ResourceManager SigManager= new ResourceManager("Compdfkit_Tools.Strings.Signature", Assembly.GetExecutingAssembly());
+        public static ResourceManager DocInfoManager= new ResourceManager("Compdfkit_Tools.Strings.DocInfo", Assembly.GetExecutingAssembly());
+        public static ResourceManager SecurityManager= new ResourceManager("Compdfkit_Tools.Strings.Security", Assembly.GetExecutingAssembly());
+        public static ResourceManager DocEditorManager= new ResourceManager("Compdfkit_Tools.Strings.DocEditor", Assembly.GetExecutingAssembly());
+    }
+}

+ 78 - 0
Demo/Examples/Compdfkit_Tools/Common/Helper/PasswordHelper.cs

@@ -0,0 +1,78 @@
+using System.Windows;
+using System.Windows.Controls;
+using Compdfkit_Tools.Common;
+using Compdfkit_Tools.Helper;
+using ComPDFKit.PDFDocument;
+
+namespace PasswordBoxPlus.Helper
+{
+    public class PasswordHelper
+    {
+        public static readonly DependencyProperty PasswordProperty = DependencyProperty.RegisterAttached("Password", typeof(string), typeof(PasswordHelper),
+            new PropertyMetadata(new PropertyChangedCallback(OnPropertyChanged)));
+
+        public static string GetPassword(DependencyObject d)
+        {
+            return (string)d.GetValue(PasswordProperty);
+        }
+        public static void SetPassword(DependencyObject d, string value)
+        {
+            d.SetValue(PasswordProperty, value);
+        }
+
+        public static readonly DependencyProperty AttachProperty = DependencyProperty.RegisterAttached("Attach", typeof(string), typeof(PasswordHelper),
+            new PropertyMetadata(new PropertyChangedCallback(OnAttachChanged)));
+
+        public static string GetAttach(DependencyObject d)
+        {
+            return (string)d.GetValue(AttachProperty);
+        }
+        public static void SetAttach(DependencyObject d, string value)
+        {
+            d.SetValue(AttachProperty, value);
+        }
+
+        static bool isUpdating = false;
+        private static void OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            PasswordBox passwordBox = d as PasswordBox;
+            passwordBox.PasswordChanged -= passwordBox_PasswordChanged;
+            if (!isUpdating)
+                (d as PasswordBox).Password = e.NewValue.ToString();
+            passwordBox.PasswordChanged += passwordBox_PasswordChanged;
+        }
+
+        private static void OnAttachChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
+        {
+            PasswordBox passwordBox = d as PasswordBox;
+            passwordBox.PasswordChanged += passwordBox_PasswordChanged;
+        }
+
+        private static void passwordBox_PasswordChanged(object sender, RoutedEventArgs e)
+        {
+            PasswordBox passwordBox = sender as PasswordBox;
+            isUpdating = true;
+            SetPassword(passwordBox, passwordBox.Password);
+            isUpdating = false;
+        }
+        
+        public static bool UnlockWithOwnerPassword(CPDFDocument document)
+        {
+            PasswordWindow window = new PasswordWindow();
+            window.InitDocument(document);
+            window.PasswordType = PasswordType.OwnerPassword;
+            if (Application.Current.MainWindow != null) 
+                window.Owner = Window.GetWindow(Application.Current.MainWindow);
+            window.PasswordDialog.SetShowText(document.FileName + " " + LanguageHelper.CommonManager.GetString("Tip_Permission"));
+            window.ShowDialog();
+            return !IsOwnerLocked(document);
+        }
+        
+        public static bool IsOwnerLocked(CPDFDocument document)
+        {
+            var info = document.GetPermissionsInfo();
+            return !info.AllowsCopying || !info.AllowsPrinting || !info.AllowsCommenting ||
+                   !info.AllowsHighQualityPrinting || !info.AllowsDocumentChanges || !info.AllowsDocumentAssembly;
+        }
+    }
+}

+ 127 - 0
Demo/Examples/Compdfkit_Tools/Common/HomePage/FeaturesListControl.xaml

@@ -0,0 +1,127 @@
+<UserControl x:Class="Compdfkit_Tools.PDFControl.FeaturesListControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Compdfkit_Tools.PDFControl"
+             mc:Ignorable="d" 
+             d:DesignHeight="450" d:DesignWidth="800"
+             Loaded="UserControl_Loaded"
+             Unloaded="UserControl_Unloaded">
+    <UserControl.Resources>
+        <Style TargetType="Button" x:Key="PageButtonStyle">
+            <Setter Property="Padding" Value="0"/>
+            <Setter Property="BorderThickness" Value="0"/>
+            <Setter Property="Margin" Value="0"/>
+            <Setter Property="Template">
+                <Setter.Value>
+                    <ControlTemplate TargetType="{x:Type Button}">
+                        <Border x:Name="border"
+                                Background="Transparent"
+                                BorderThickness="0"
+                                SnapsToDevicePixels="True"
+                                Height="{TemplateBinding Height}"
+                                Width="{TemplateBinding Width}">
+                            <ContentPresenter HorizontalAlignment="Center"
+                                              VerticalAlignment="Center"
+                                              Content="{TemplateBinding Content}"></ContentPresenter>
+                        </Border>
+                        <ControlTemplate.Triggers>
+                            <Trigger Property="IsMouseOver" Value="True">
+                                <Setter TargetName="border" Property="Background" Value="#1A000000"></Setter>
+                            </Trigger>
+                            <Trigger Property="IsPressed" Value="True">
+                                <Setter TargetName="border" Property="Background" Value="#2A000000"></Setter>
+                            </Trigger>
+                        </ControlTemplate.Triggers>
+                    </ControlTemplate>
+                </Setter.Value>
+            </Setter>
+        </Style>
+
+        <Style TargetType="ListBox" x:Key="WrapListBoxStyle">
+            <Setter Property="BorderThickness" Value="0" />
+            <Setter Property="BorderBrush" Value="Transparent" />
+            <Setter Property="Background" Value="Transparent" />
+            <Setter Property="Padding" Value="0" />
+        </Style>
+
+        <Style x:Key="ItemBorderStyle" TargetType="Border">
+            <Setter Property="CornerRadius" Value="5" />
+            <Setter Property="BorderThickness" Value="1" />
+            <Setter Property="BorderBrush" Value="Transparent"></Setter>
+            <Setter Property="Background" Value="#ffffff"></Setter>
+            <Style.Triggers>
+                <Trigger Property="IsMouseOver" Value="True">
+                    <Setter Property="BorderBrush" Value="#6495ed"></Setter>
+                </Trigger>
+            </Style.Triggers>
+        </Style>
+    </UserControl.Resources>
+    <Grid Margin="0, 0, 0,0">
+        <Grid.RowDefinitions>
+            <RowDefinition Height="40"></RowDefinition>
+            <RowDefinition></RowDefinition>
+        </Grid.RowDefinitions>
+        <TextBlock x:Name="FeaturesListTxb" Foreground="#001A4E" FontFamily="Microsoft YaHei" FontSize="24" LineHeight="32" FontWeight="Medium"></TextBlock>
+        <Grid x:Name="ListGd" Grid.Row="1" SizeChanged="ListGd_SizeChanged">
+            <Grid.RowDefinitions>
+                <RowDefinition></RowDefinition>
+                <RowDefinition  Height="auto"></RowDefinition>
+            </Grid.RowDefinitions>
+            <ListBox  x:Name="FeaturesListBox" Style="{StaticResource WrapListBoxStyle}" ItemsSource="{Binding PageItems}" ScrollViewer.HorizontalScrollBarVisibility="Disabled"  SelectionMode="Single" >
+                <ListBox.ItemContainerStyle>
+                    <Style TargetType="ListBoxItem">
+                        <Setter Property="Margin" Value="{Binding ItemMargin}" />
+                        <Setter Property="Template">
+                            <Setter.Value>
+                                <ControlTemplate TargetType="ListBoxItem">
+                                    <ContentPresenter />
+                                </ControlTemplate>
+                            </Setter.Value>
+                        </Setter>
+                    </Style>
+                </ListBox.ItemContainerStyle>
+                <ListBox.ItemsPanel>
+                    <ItemsPanelTemplate>
+                        <WrapPanel Width="{Binding ElementName=FeaturesListBox, Path=ActualWidth}"></WrapPanel>
+                    </ItemsPanelTemplate>
+                </ListBox.ItemsPanel>
+                <ListBox.ItemTemplate>
+                    <DataTemplate>
+                        <Border  Width="{Binding ItemWidth}" Height="{Binding ItemHeight}" Style="{StaticResource ItemBorderStyle}">
+                            <Grid Margin="16,20,16,0">
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition Width="33"></ColumnDefinition>
+                                    <ColumnDefinition></ColumnDefinition>
+                                </Grid.ColumnDefinitions>
+                                <ContentControl Grid.Column="0" Content="{Binding IconCanvas}" />
+                                <Grid Grid.Column="1">
+                                    <Grid.RowDefinitions>
+                                        <RowDefinition Height="auto"></RowDefinition>
+                                        <RowDefinition></RowDefinition>
+                                    </Grid.RowDefinitions>
+                                    <TextBlock FontSize="14" Margin="0,0,0,5"  Foreground="#1a1a1a" FontWeight="Bold" Text="{Binding TitleText}"/>
+                                    <TextBlock Grid.Row="1"  FontSize="12" Foreground="#666666" Text="{Binding DescriptionText}" TextWrapping="Wrap" TextTrimming="CharacterEllipsis"/>
+                                </Grid>
+                            </Grid>
+                        </Border>
+                    </DataTemplate>
+                </ListBox.ItemTemplate>
+            </ListBox>
+            <Grid Grid.Row="1">
+                <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
+                    <Button Name="PrePageBtn" Style="{StaticResource PageButtonStyle}" Height="40" Width="40" Click="PrePageBtn_Click">
+                        <Path Data="M5.79777 12L6.5 11.2733L1.40446 6L6.5 0.726727L5.79777 0L0 6L5.79777 12Z" Fill="#001A4E"></Path>
+                    </Button>
+                    <TextBlock Text="{Binding CurrentIndex}" FontFamily="Microsoft YaHei" VerticalAlignment="Center" FontWeight="DemiBold" FontSize="18"  Margin="5,0,5,0"></TextBlock>
+                    <TextBlock Text="/" FontFamily="Microsoft YaHei" VerticalAlignment="Center" FontWeight="DemiBold" FontSize="18" ></TextBlock>
+                    <TextBlock Text="{Binding TotalIndex}" FontFamily="Microsoft YaHei" VerticalAlignment="Center" FontWeight="DemiBold" FontSize="18"   Margin="5,0,5,0"></TextBlock>
+                    <Button x:Name="NextPageBtn"  Style="{StaticResource PageButtonStyle}" Height="40" Width="40" Click="NextPageBtn_Click">
+                        <Path Data="M0.702232 12L0 11.2733L5.09554 6L0 0.726727L0.702232 0L6.5 6L0.702232 12Z" Fill="#001A4E"></Path>
+                    </Button>
+                </StackPanel>
+            </Grid>
+        </Grid>
+    </Grid>
+</UserControl>

+ 262 - 0
Demo/Examples/Compdfkit_Tools/Common/HomePage/FeaturesListControl.xaml.cs

@@ -0,0 +1,262 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using Compdfkit_Tools.Helper;
+
+namespace Compdfkit_Tools.PDFControl
+{
+    /// <summary>
+    /// Interaction logic for FeaturesListControl.xaml
+    /// </summary>
+    public partial class FeaturesListControl : UserControl, INotifyPropertyChanged
+    {
+        private int _currentIndex = 1;
+        public int CurrentIndex
+        {
+            get => _currentIndex;
+            set
+            {
+                if (UpdateProper(ref _currentIndex, value))
+                {
+                    RefreshCurrentItems();
+                }
+            }
+        }
+
+        private int _totalIndex = 1;
+        public int TotalIndex
+        {
+            get => _totalIndex;
+            set
+            {
+                UpdateProper(ref _totalIndex, value);
+            }
+        }
+
+        private int _horizontalItemNumber = 1;
+        public int HorizontalItemNumber
+        {
+            get => _horizontalItemNumber;
+            set
+            {
+                if (UpdateProper(ref _horizontalItemNumber, value))
+                {
+                    ResetTotalIndex();
+                }
+            }
+        }
+
+        private int _verticalItemNumber = 1;
+        public int VerticalItemNumber
+        {
+            get => _verticalItemNumber;
+            set
+            {
+                if (UpdateProper(ref _verticalItemNumber, value))
+                {
+                    ResetTotalIndex();
+                }
+            }
+        }
+
+        private ObservableCollection<CustomItem> _pageItems = new ObservableCollection<CustomItem>();
+        public ObservableCollection<CustomItem> PageItems
+        {
+            get => _pageItems;
+            set
+            {
+                UpdateProper(ref _pageItems, value);
+            }
+        }
+
+        public event EventHandler<CustomItem> SelectionChanged;
+        public event PropertyChangedEventHandler PropertyChanged;
+
+        public static readonly DependencyProperty ItemsProperty =
+           DependencyProperty.Register("Items", typeof(ObservableCollection<CustomItem>), typeof(FeaturesListControl), new PropertyMetadata(null));
+
+        public ObservableCollection<CustomItem> Items
+        {
+            get { return (ObservableCollection<CustomItem>)GetValue(ItemsProperty); }
+            set { SetValue(ItemsProperty, value); }
+        }
+
+        public FeaturesListControl()
+        {
+            this.DataContext = this;
+            InitializeComponent();
+            Items = new ObservableCollection<CustomItem>();
+            FeaturesListTxb.Text = LanguageHelper.CommonManager.GetString("Title_Features");
+        }
+
+        private void FeaturesListBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
+        {
+            var listBox = sender as ListBox;
+            if (listBox != null && listBox.SelectedIndex != -1)
+            {
+                SelectionChanged?.Invoke(sender, Items[HorizontalItemNumber*VerticalItemNumber*(CurrentIndex-1) + listBox.SelectedIndex]);
+                listBox.SelectedIndex = -1;
+            }
+        }
+
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+            FeaturesListBox.SelectionChanged += FeaturesListBox_SelectionChanged;
+            ResetTotalIndex();
+        }
+
+        private void ResetTotalIndex()
+        {
+            if (this.IsLoaded)
+            {
+                if (FeaturesListBox != null && HorizontalItemNumber != 0 && VerticalItemNumber != 0)
+                {
+                    int totalIndex = Items.Count / (HorizontalItemNumber * VerticalItemNumber);
+                    if (Items.Count % (HorizontalItemNumber * VerticalItemNumber) != 0)
+                    {
+                        TotalIndex = totalIndex + 1;
+                    }
+                    else
+                    {
+                        TotalIndex = totalIndex;
+                    }
+                    if (CurrentIndex > TotalIndex)
+                    {
+                        CurrentIndex = TotalIndex;
+                    }
+                    RefreshCurrentItems();
+                }
+            } 
+        }
+
+        private void RefreshCurrentItems()
+        {
+            if (this.IsLoaded)
+            {
+                PageItems.Clear();
+                int baseItemIndex = (CurrentIndex - 1) * HorizontalItemNumber * VerticalItemNumber;
+                for (int ItemIndex = baseItemIndex;
+                    ItemIndex < baseItemIndex + HorizontalItemNumber * VerticalItemNumber && ItemIndex < Items.Count;
+                    ItemIndex++)
+                {
+                    PageItems.Add(Items[ItemIndex]);
+                }
+            }
+        }
+
+        private void PrePageBtn_Click(object sender, RoutedEventArgs e)
+        {
+            if (CurrentIndex > 1)
+            {
+                CurrentIndex--;
+            }
+        }
+
+        private void NextPageBtn_Click(object sender, RoutedEventArgs e)
+        {
+            if (CurrentIndex < TotalIndex)
+            {
+                CurrentIndex++;
+            }
+        }
+
+        protected bool UpdateProper<T>(ref T properValue,
+                    T newValue,
+                    [CallerMemberName] string properName = "")
+        {
+            if (object.Equals(properValue, newValue))
+                return false;
+
+            properValue = newValue;
+            OnPropertyChanged(properName);
+            return true;
+        }
+
+        protected void OnPropertyChanged([CallerMemberName] string propertyName = "") =>
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+
+        private void ListGd_SizeChanged(object sender, SizeChangedEventArgs e)
+        {  
+            if (FeaturesListBox != null && CustomItem.ItemWidth > 0 && CustomItem.ItemHeight > 0)
+            {
+                HorizontalItemNumber = (int)((FeaturesListBox.ActualWidth) / (CustomItem.ItemWidth + 2 * CustomItem.ItemMargin));
+                VerticalItemNumber = (int)((FeaturesListBox.ActualHeight) / (CustomItem.ItemHeight + 2 * CustomItem.ItemMargin));
+            }
+        }
+
+        private void UserControl_Unloaded(object sender, RoutedEventArgs e)
+        {
+            FeaturesListBox.SelectionChanged -= FeaturesListBox_SelectionChanged;
+
+        }
+    }
+    public class CustomItem : Control, INotifyPropertyChanged
+    {
+        static public double ItemWidth { get; set; } = 400;
+        static public double ItemHeight { get; set; } = 128;
+        static public double ItemMargin { get; set; } = 10;
+
+        public string Feature;
+
+        private string _titleText;
+        public string TitleText
+        {
+            get => _titleText;
+            set
+            {
+                UpdateProper(ref _titleText, value);
+            }
+        }
+
+        private Canvas _iconCanvas;
+        public Canvas IconCanvas
+        {
+            get => _iconCanvas;
+            set
+            {
+                UpdateProper(ref _iconCanvas, value);
+            }
+        }
+         
+        private string _descriptionText;
+        public string DescriptionText
+        {
+            get => _descriptionText;
+            set
+            {
+
+                UpdateProper(ref _descriptionText, value);
+            }
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        protected void UpdateProper<T>(ref T properValue,
+                            T newValue,
+                            [CallerMemberName] string properName = "")
+        {
+            if (object.Equals(properValue, newValue))
+                return;
+
+            properValue = newValue;
+            OnPropertyChanged(properName);
+
+        }
+
+        protected void OnPropertyChanged([CallerMemberName] string propertyName = "") =>
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+    }
+}

+ 100 - 0
Demo/Examples/Compdfkit_Tools/Common/HomePage/HomePageControl.xaml

@@ -0,0 +1,100 @@
+<UserControl x:Class="Compdfkit_Tools.PDFControl.HomePageControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Compdfkit_Tools.PDFControl"
+             mc:Ignorable="d" 
+               xmlns:common="clr-namespace:Compdfkit_Tools.Common"
+             d:DesignHeight="800" d:DesignWidth="1920"
+             Loaded="UserControl_Loaded"
+             Unloaded="UserControl_Unloaded" x:Name="HomePage">
+    <UserControl.Resources>
+        <DrawingImage x:Key="OpenDocumentIcon">
+            <DrawingImage.Drawing>
+                <DrawingGroup>
+                    <GeometryDrawing Brush="#FFFFFFFF">
+                        <GeometryDrawing.Geometry>
+                            <PathGeometry FillRule="EvenOdd" Figures="M19.8341,0L2,0 2,30 28,30 28,8.2809 19.8341,0z M18,2L18,10 26,10 18,2z M16,14L16,19 21,19 21,21 16,21 16,26 14,26 14,21 9,21 9,19 14,19 14,14 16,14z" />
+                        </GeometryDrawing.Geometry>
+                    </GeometryDrawing>
+                </DrawingGroup>
+            </DrawingImage.Drawing>
+        </DrawingImage>
+        <DrawingImage x:Key="CreateDocumentIcon">
+            <DrawingImage.Drawing>
+                <DrawingGroup>
+                    <GeometryDrawing Brush="#FF001A4E">
+                        <GeometryDrawing.Geometry>
+                            <PathGeometry FillRule="EvenOdd" Figures="M20.3341,0L2.5,0 2.5,30 28.5,30 28.5,8.2809 20.3341,0z M18.5,2L18.5,10 26.5,10 18.5,2z M16.5,14L16.5,19 21.5,19 21.5,21 16.5,21 16.5,26 14.5,26 14.5,21 9.5,21 9.5,19 14.5,19 14.5,14 16.5,14z" />
+                        </GeometryDrawing.Geometry>
+                    </GeometryDrawing>
+                </DrawingGroup>
+            </DrawingImage.Drawing>
+        </DrawingImage>
+        <Style x:Key="ButtonHoverStyle" TargetType="Button">
+            <Setter Property="Template">
+                <Setter.Value>
+                    <ControlTemplate TargetType="Button">
+                        <Grid x:Name="grid" Background="{TemplateBinding Background}" SnapsToDevicePixels="True">
+                            <Border Name="border" Background="Transparent" BorderThickness="1" BorderBrush="#001A4E">
+                                <ContentPresenter
+                                    HorizontalAlignment="Center"
+                                    VerticalAlignment="Center"
+                                    Focusable="False" 
+                                    RecognizesAccessKey="True">
+                                </ContentPresenter>
+                            </Border>
+                        </Grid>
+                        <ControlTemplate.Triggers>
+                            <Trigger Property="IsMouseOver" Value="true">
+                                <Setter TargetName="border" Property="Background" Value="#AA738199" />
+                            </Trigger>
+                        </ControlTemplate.Triggers>
+                    </ControlTemplate>
+                </Setter.Value>
+            </Setter>
+        </Style>
+        <common:HomePageFileListHeightConverter x:Key="HomePageFileListHeightConverter"></common:HomePageFileListHeightConverter>
+        <common:CommonResourceConverter x:Key="CommonResourceConverter"></common:CommonResourceConverter>
+    </UserControl.Resources>
+    <Grid>
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="260"></ColumnDefinition>
+            <ColumnDefinition></ColumnDefinition>
+        </Grid.ColumnDefinitions>
+        <Grid Margin="30,40" Height="auto" VerticalAlignment="Top"></Grid>
+            <StackPanel Grid.Column="0" Margin="0,40,0,0">
+                <Button Width="200" Height="64" Background="#001A4E" Click="OpenDocument_Click" Style="{StaticResource ButtonHoverStyle}">
+                    <StackPanel Orientation="Horizontal">
+                        <Image Source="{StaticResource OpenDocumentIcon}" Height="30" Width="30"></Image>
+                        <TextBlock Margin="12,0,0,0" VerticalAlignment="Center" Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Button_Open}" Foreground="White" FontFamily="Microsoft YaHei" FontSize="16" LineHeight="24"></TextBlock>
+                    </StackPanel>
+                </Button>
+                
+                <Button Width="200" Height="64" Background="White" Margin="0,28,0,0" Click="CreateDocument_Click" Style="{StaticResource ButtonHoverStyle}">
+                    <StackPanel Orientation="Horizontal" Margin="5,0,0,0">
+                        <Image Source="{StaticResource CreateDocumentIcon}" Height="30" Width="30"></Image>
+                        <TextBlock Margin="12,0,0,0" VerticalAlignment="Center" Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Button_Create}" Foreground="#001A4E" FontFamily="Microsoft YaHei" FontSize="16" LineHeight="24"></TextBlock>
+                    </StackPanel>
+                </Button>
+            </StackPanel>
+        <ScrollViewer Grid.Column="1" VerticalScrollBarVisibility="Auto" IsTabStop="True">
+            <Grid x:Name="HomeGrid" Background="#F2F2F2">
+                <Grid.RowDefinitions>
+                    <RowDefinition Height="580" ></RowDefinition>
+                    <RowDefinition> </RowDefinition>
+                </Grid.RowDefinitions>
+                <local:FeaturesListControl x:Name="FeaturesListControl" Margin=" 60,30,0,0"></local:FeaturesListControl>
+                <local:RecentFilesControl Grid.Row="1" x:Name="RecentFilesControl" Margin="60,0,0,0" >
+                    <local:RecentFilesControl.Height>
+                        <MultiBinding Converter="{StaticResource HomePageFileListHeightConverter}">
+                            <Binding ElementName="HomePage" Path="ActualHeight"></Binding>
+                            <Binding ElementName="FeaturesListControl" Path="ActualHeight"></Binding>
+                        </MultiBinding>
+                    </local:RecentFilesControl.Height>
+                </local:RecentFilesControl>
+            </Grid>
+        </ScrollViewer>
+    </Grid>
+</UserControl>

File diff suppressed because it is too large
+ 613 - 0
Demo/Examples/Compdfkit_Tools/Common/HomePage/HomePageControl.xaml.cs


File diff suppressed because it is too large
+ 124 - 0
Demo/Examples/Compdfkit_Tools/Common/HomePage/RecentFilesControl.xaml


+ 46 - 0
Demo/Examples/Compdfkit_Tools/Common/HomePage/RecentFilesControl.xaml.cs

@@ -0,0 +1,46 @@
+using Compdfkit_Tools.Helper;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Compdfkit_Tools.PDFControl
+{
+    /// <summary>
+    /// Interaction logic for RecentFilesControl.xaml
+    /// </summary>
+    public partial class RecentFilesControl : UserControl
+    {
+        /// <summary>
+        /// Open file event. Parameter is file path.
+        /// </summary>
+        public event EventHandler<OpenFileEventArgs> OpenFileEvent;
+        public RecentFilesControl()
+        {
+            this.DataContext = FileHistoryHelper<PDFFileInfo>.Instance;
+            InitializeComponent();
+        }
+
+        private void ListViewItem_DoubleClick(object sender, MouseButtonEventArgs e)
+        {
+            if (sender is ListViewItem listViewItem)
+            {
+                if (listViewItem.Content is PDFFileInfo fileInfo)
+                {
+                    OpenFileEvent?.Invoke(this, new OpenFileEventArgs(FileOperationType.OpenFileDirectly, fileInfo.FilePath));
+                }
+            }
+        }
+
+    }
+}

+ 44 - 0
Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordBoxControl.xaml

@@ -0,0 +1,44 @@
+<UserControl x:Class="Compdfkit_Tools.Common.PasswordBoxControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:helper="clr-namespace:PasswordBoxPlus.Helper"
+             mc:Ignorable="d" 
+            xmlns:common="clr-namespace:Compdfkit_Tools.Common"
+            d:DesignHeight="36" d:DesignWidth="200">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <common:AntiStringToVisibilityConverter x:Key="AntiStringToVisibilityConverter"></common:AntiStringToVisibilityConverter>
+            <common:StringToVisibilityConverter x:Key="StringToVisibilityConverter"></common:StringToVisibilityConverter>
+            <common:BoolToVisibleConverter x:Key="BoolToVisibilityConverter"></common:BoolToVisibleConverter>
+            <common:AntiBoolToVisibilityConverter x:Key="AntiBoolToVisibilityConverter"></common:AntiBoolToVisibilityConverter>
+            <ResourceDictionary.MergedDictionaries>
+                <ResourceDictionary Source="../../Asset/Styles/RoundCornerPasswordBoxStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../../Asset/Styles/RoundCornerTextBoxStyle.xaml"></ResourceDictionary>
+                <ResourceDictionary Source="../../Asset/Styles/EyeCheckBoxStyle.xaml"></ResourceDictionary>
+            </ResourceDictionary.MergedDictionaries>
+        </ResourceDictionary>
+    </UserControl.Resources>
+    <Grid x:Name="Grid">
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition></ColumnDefinition>
+            <ColumnDefinition Width="24"></ColumnDefinition>
+        </Grid.ColumnDefinitions>
+        <PasswordBox x:Name="PasswordBox" Grid.ColumnSpan="2" Style="{StaticResource RoundCornerPasswordBoxStyle}" 
+                     helper:PasswordHelper.Attach="true" helper:PasswordHelper.Password="{Binding Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" 
+                     Visibility="{Binding ElementName=DisplayPasswordChk, Path=IsChecked, Converter={StaticResource AntiBoolToVisibilityConverter}}">
+        </PasswordBox>
+
+        <TextBox Grid.ColumnSpan="2" x:Name="TextBox" Style="{StaticResource PasswordTextBoxStyle}" 
+                 Visibility="{Binding ElementName=DisplayPasswordChk, Path=IsChecked, Converter={StaticResource BoolToVisibilityConverter}}" 
+                 Text="{Binding Password, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" TextChanged="TextBox_TextChanged">
+        </TextBox>
+
+        <TextBlock x:Name="TextBlock" IsHitTestVisible="False" Text="{Binding Watermark, RelativeSource={RelativeSource AncestorType=UserControl}}"
+                   VerticalAlignment="Center" FontSize="13" Margin="15,0,0,0" Foreground="#BBB" 
+                   Visibility="{Binding Password, Converter={StaticResource StringToVisibilityConverter}}">
+        </TextBlock>
+        <CheckBox x:Name="DisplayPasswordChk" Style="{StaticResource EyeCheckBoxStyle}" Visibility="{Binding Password, Converter={StaticResource AntiStringToVisibilityConverter}}" Height="16" Grid.Column="1" HorizontalAlignment="Left" Panel.ZIndex="1" IsChecked="False"></CheckBox>
+    </Grid>
+</UserControl>

+ 97 - 0
Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordBoxControl.xaml.cs

@@ -0,0 +1,97 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Compdfkit_Tools.Common
+{
+    /// <summary>
+    /// Interaction logic for PasswordControl.xaml
+    /// </summary>
+    public partial class PasswordBoxControl : UserControl, INotifyPropertyChanged
+    {
+        public static readonly DependencyProperty WatermarkProperty =
+    DependencyProperty.Register("Watermark", typeof(string), typeof(PasswordBoxControl), new PropertyMetadata(null));
+        public string Watermark
+        {
+            get { return (string)GetValue(WatermarkProperty); }
+            set { SetValue(WatermarkProperty, value); }
+        }
+
+        public static readonly DependencyProperty PasswordProperty =
+DependencyProperty.Register("Password", typeof(string), typeof(PasswordBoxControl), new PropertyMetadata(string.Empty));
+        public string Password
+        {
+            get { return (string)GetValue(PasswordProperty); }
+            set { SetValue(PasswordProperty, value); }
+        }
+
+        #region - 用于绑定ViewModel部分 -
+
+        public ICommand Command
+        {
+            get { return (ICommand)GetValue(CommandProperty); }
+            set { SetValue(CommandProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty CommandProperty =
+            DependencyProperty.Register("Command", typeof(ICommand), typeof(PasswordBoxControl), new PropertyMetadata(default(ICommand)));
+
+        public object CommandParameter
+        {
+            get { return (object)GetValue(CommandParameterProperty); }
+            set { SetValue(CommandParameterProperty, value); }
+        }
+
+        // Using a DependencyProperty as the backing store for MyProperty.  This enables animation, styling, binding, etc...
+        public static readonly DependencyProperty CommandParameterProperty =
+            DependencyProperty.Register("CommandParameter", typeof(object), typeof(PasswordBoxControl), new PropertyMetadata(default(object)));
+
+        public IInputElement CommandTarget { get; set; }
+
+        #endregion
+
+        public static readonly RoutedEvent PasswordChangedEvent =
+        EventManager.RegisterRoutedEvent("PasswordChanged", RoutingStrategy.Bubble, typeof(RoutedEventHandler), typeof(PasswordBoxControl));
+
+        public event RoutedEventHandler PasswordChanged
+        {
+            add => AddHandler(PasswordChangedEvent, value);
+            remove => RemoveHandler(PasswordChangedEvent, value);
+        }
+
+        public PasswordBoxControl()
+        {
+            InitializeComponent();
+            Grid.DataContext = this;
+        }
+
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+
+        private void TextBox_TextChanged(object sender, TextChangedEventArgs e)
+        {
+            if (Password == string.Empty)
+            {
+                DisplayPasswordChk.IsChecked = false;
+            }
+        }
+    }
+}

+ 13 - 6
Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordDialog.xaml

@@ -6,7 +6,10 @@
              xmlns:local="clr-namespace:Compdfkit_Tools.Common"
              mc:Ignorable="d" 
              d:DesignHeight="226" d:DesignWidth="534" BorderBrush="Black" BorderThickness="1">
-    
+
+    <UserControl.Resources>
+        <local:CommonResourceConverter x:Key="CommonResourceConverter" />
+    </UserControl.Resources>
     <Grid  Width="534" Height="226" HorizontalAlignment="Center" VerticalAlignment="Center" Background="White">
         <Grid.ColumnDefinitions>
             <ColumnDefinition Width="*"></ColumnDefinition>
@@ -18,7 +21,8 @@
             <RowDefinition Height="auto"></RowDefinition>
         </Grid.RowDefinitions>
 
-        <TextBlock Height="20" FontSize="14" LineHeight="16" Margin="12,6,0,0" HorizontalAlignment="Left">Password</TextBlock>
+        <TextBlock Height="20" FontSize="14" LineHeight="16" Margin="12,6,0,0" HorizontalAlignment="Left"
+                   Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Title_Password}"></TextBlock>
         
         <Button Grid.Column="1" Width="16" Height="16" HorizontalAlignment="Right" Margin="0,8,8,0" BorderThickness="0" Click="PasswordDialogClose_Click">
             <Button.Content>
@@ -40,12 +44,13 @@
                 <RowDefinition Height="auto"></RowDefinition>
             </Grid.RowDefinitions>
 
-            <Image Width="32" Height="32" Source="../../Resource/warn.png"/>
+            <Image Width="32" Height="32" Source="../../Asset/Resource/warn.png"/>
 
             <TextBlock FontSize="14" Foreground="#43474D" Grid.Column="1" Name="FileEncryptText" VerticalAlignment="Center"></TextBlock>
 
             <StackPanel Orientation="Horizontal" Grid.Column="1" Grid.Row="1" Height="62" Margin="0,22,0,0" >
-                <TextBlock FontSize="14" Foreground="#43474D" Margin="0,-30,0,0"  VerticalAlignment="Center">Please Enter the Password:</TextBlock>
+                <TextBlock FontSize="14" Foreground="#43474D" Margin="0,-30,0,0"  VerticalAlignment="Center"
+                           Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Tip_Password}"></TextBlock>
                 <StackPanel Margin="8,0,0,0">
                     <PasswordBox Name="PasswordBoxText" Padding="5,0,0,0" Height="32" Width="185"  VerticalContentAlignment="Center" VerticalAlignment="Center"></PasswordBox>
                     <TextBlock Name="ErrorTipsText" Foreground="Red" Margin="0,4,0,0" Visibility="Collapsed"></TextBlock>
@@ -54,8 +59,10 @@
         </Grid>
 
         <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Grid.Row="2" Margin="0,0,24,12" Grid.ColumnSpan="2">
-            <Button Width="112" Height="32" Click="PasswordDialogConfirm_Click">OK</Button>
-            <Button Width="112" Height="32" Margin="8,0,0,0" Click="PasswordDialogCancel_Click">Cancel</Button>
+            <Button Width="112" Height="32" Click="PasswordDialogConfirm_Click"
+                    Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Button_OK}"></Button>
+            <Button Width="112" Height="32" Margin="8,0,0,0" Click="PasswordDialogCancel_Click"
+                    Content="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Button_Cancel}"></Button>
         </StackPanel>
     </Grid>
 </UserControl>

+ 2 - 0
Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordWindow.xaml

@@ -8,6 +8,8 @@
         mc:Ignorable="d"
         Title="PasswordWindow" 
         WindowStyle="None"
+        WindowStartupLocation="CenterScreen"
+        MouseLeftButtonDown="PasswordWindow_MouseLeftButtonDown"
         Height="226" Width="534" >
     <Grid>
         <local:PasswordDialog x:Name="PasswordDialog" Loaded="PasswordDialog_Loaded" Unloaded="PasswordDialog_Unloaded"></local:PasswordDialog>

+ 46 - 5
Demo/Examples/Compdfkit_Tools/Common/PasswordControl/PasswordWindow.xaml.cs

@@ -1,9 +1,18 @@
 using ComPDFKit.PDFDocument;
 using System;
 using System.Windows;
+using System.Windows.Input;
+using Compdfkit_Tools.Helper;
+using ComPDFKit.PDFDocument;
 
 namespace Compdfkit_Tools.Common
 {
+    public enum PasswordType : byte
+    {
+        UserPassword,
+        OwnerPassword
+    }
+
     /// <summary>
     /// Interaction logic for PasswordWindow.xaml
     /// </summary>
@@ -11,6 +20,7 @@ namespace Compdfkit_Tools.Common
     {
         private CPDFDocument pdfDoc;
 
+        public PasswordType PasswordType = PasswordType.UserPassword;
         public delegate void DialogCloseEventHandler(object sender, PasswordEventArgs e);
         public event DialogCloseEventHandler DialogClosed;
 
@@ -49,17 +59,40 @@ namespace Compdfkit_Tools.Common
 
         private void PasswordDialog_Confirmed(object sender, string e)
         {
+            string errorMessage = LanguageHelper.CommonManager.GetString("Tip_WrongPassword");
             if (pdfDoc != null)
             {
-                pdfDoc.UnlockWithPassword(e);
-                if (pdfDoc.IsLocked == false)
+                if(PasswordType == PasswordType.UserPassword)
                 {
-                    PasswordEventArgs passwordEventArgs = new PasswordEventArgs(e);
-                    CloseWindow(passwordEventArgs);
+                    pdfDoc.UnlockWithPassword(e);
+                    if (pdfDoc.IsLocked == false)
+                    {
+                        PasswordEventArgs passwordEventArgs = new PasswordEventArgs(e);
+                        CloseWindow(passwordEventArgs);
+                    }
+                    else
+                    {
+                        PasswordDialog.SetShowError(errorMessage, Visibility.Visible);
+                    }
                 }
                 else
                 {
-                    PasswordDialog.SetShowError("Wrong Password", Visibility.Visible);
+                    if (pdfDoc.UnlockWithPassword(e))
+                    {
+                        if(pdfDoc.CheckOwnerPassword(e))
+                        {
+                            PasswordEventArgs passwordEventArgs = new PasswordEventArgs(e);
+                            CloseWindow(passwordEventArgs);
+                        }
+                        else
+                        {
+                            PasswordDialog.SetShowError(errorMessage, Visibility.Visible);
+                        }
+                    }
+                    else
+                    {
+                        PasswordDialog.SetShowError(errorMessage, Visibility.Visible);
+                    }
                 }
             }
         }
@@ -79,6 +112,14 @@ namespace Compdfkit_Tools.Common
             // Close the pop-up window
             Close();
         }
+
+        private void PasswordWindow_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            if (e.LeftButton == MouseButtonState.Pressed)
+            {
+                DragMove();
+            }
+        }
     }
 
     public class PasswordEventArgs : EventArgs

+ 97 - 0
Demo/Examples/Compdfkit_Tools/Common/PreviewControl/PreviewControl.xaml

@@ -0,0 +1,97 @@
+<UserControl x:Class="Compdfkit_Tools.PDFControl.PreviewControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Compdfkit_Tools.PDFControl"
+              xmlns:common="clr-namespace:Compdfkit_Tools.Common"
+             mc:Ignorable="d" 
+             d:DesignHeight="449" d:DesignWidth="248" Loaded="UserControl_Loaded">
+    <UserControl.Resources>
+        <ResourceDictionary>
+            <Style x:Key="TransparentButtonStyle" TargetType="{x:Type Button}">
+                <Setter Property="BorderThickness" Value="0" />
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="Button">
+                            <Border Name="border">
+                                <ContentPresenter />
+                            </Border>
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter TargetName="border" Property="Background" Value="#1a000000" />
+                                </Trigger>
+                                <Trigger Property="IsPressed" Value="True">
+                                    <Setter TargetName="border" Property="Background" Value="#5a000000" />
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+            <Style x:Key="PageButtonStyle" TargetType="{x:Type Button}">
+                <Setter Property="BorderThickness" Value="0"></Setter>
+                <Setter Property="Template">
+                    <Setter.Value>
+                        <ControlTemplate TargetType="Button">
+                            <Border Name="border" Background="#E1E1E1">
+                                <ContentPresenter />
+                            </Border>
+                            <ControlTemplate.Triggers>
+                                <Trigger Property="IsMouseOver" Value="True">
+                                    <Setter TargetName="border" Property="Background" Value="#C1C1C1" />
+                                </Trigger> 
+                                <Trigger Property="IsPressed" Value="True">
+                                    <Setter TargetName="border"  Property="Background" Value="#A1A1A1" />
+                                </Trigger>
+                            </ControlTemplate.Triggers>
+                        </ControlTemplate>
+                    </Setter.Value>
+                </Setter>
+            </Style>
+            <common:CommonResourceConverter x:Key="CommonResourceConverter" />
+        </ResourceDictionary>
+    </UserControl.Resources>
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="auto"></RowDefinition>
+            <RowDefinition></RowDefinition>
+            <RowDefinition Height="auto"></RowDefinition>
+        </Grid.RowDefinitions>
+        <Grid Margin="0,0,0,10">
+            <TextBlock Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Title_Preview}" FontWeight="DemiBold" FontFamily="Microsoft YaHei" FontSize="14"></TextBlock>
+            <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" VerticalAlignment="Center">
+                <Button x:Name="ZoomInBtn" Height="20" Width="20" Style="{StaticResource TransparentButtonStyle}" Margin="0,0,10,0" Click="ScaleBtn_Click">
+                    <Path HorizontalAlignment="Center" VerticalAlignment="Center" Data="M0,6.5 C0,2.91015 2.91015,0 6.5,0 C10.0899,0 13,2.91015 13,6.5 C13,8.12212 12.4058,9.60545 11.4232,10.7442 L15.5,14.821 L14.821,15.5 L10.7442,11.4232 C9.60545,12.4058 8.12212,13 6.5,13 C2.91015,13 0,10.0899 0,6.5 Z M12,6.5 C12,3.46243 9.53757,1 6.5,1 C3.46243,1 1,3.46243 1,6.5 C1,9.53757 3.46243,12 6.5,12 C9.53757,12 12,9.53757 12,6.5 Z M10,6 V7 H3 V6 H10 Z" 
+              Fill="Black" />
+                </Button>
+                <Button x:Name="ZoomOutBtn" Height="20" Width="20"  Style="{StaticResource TransparentButtonStyle}"  Click="ScaleBtn_Click">
+                    <Path HorizontalAlignment="Center" VerticalAlignment="Center" Data="M6.5 0C2.91015 0 0 2.91015 0 6.5C0 10.0899 2.91015 13 6.5 13C8.12212 13 9.60545 12.4058 10.7442 11.4232L14.821 15.5L15.5 14.821L11.4232 10.7442C12.4058 9.60545 13 8.12212 13 6.5C13 2.91015 10.0899 0 6.5 0ZM6.5 1C9.53757 1 12 3.46243 12 6.5C12 9.53757 9.53757 12 6.5 12C3.46243 12 1 9.53757 1 6.5C1 3.46243 3.46243 1 6.5 1ZM10 6H7V3H6V6H3V7H6V10H7V7H10V6Z" 
+              Fill="Black" />
+                </Button>
+            </StackPanel>
+        </Grid>
+        <Border Grid.Row="1" x:Name="ImageGd" Background="#1A000000" ClipToBounds="True" BorderThickness="1" BorderBrush="#000000">
+            <ScrollViewer x:Name="ImageSv" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
+                <Image x:Name="Image" Source="{Binding ImageSource}" Stretch="None" MouseLeftButtonDown="Image_MouseLeftButtonDown" MouseLeftButtonUp="Image_MouseLeftButtonUp" MouseMove="Image_MouseMove">
+                    <Image.LayoutTransform>
+                        <ScaleTransform ScaleX="{Binding Scale}" ScaleY="{Binding Scale}"></ScaleTransform>
+                    </Image.LayoutTransform>
+                </Image>
+            </ScrollViewer>
+        </Border>
+        <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Grid.Row="2" Margin="0,8,0,0">
+            <Button x:Name="PrePageBtn" Height="28" Width="28" Margin="0,0,16,0" Style="{StaticResource PageButtonStyle}" Click="PageBtn_Click">
+                <Path Height="16" Width="16" Data="M11.2978 14L12 13.2733L6.90446 8L12 2.72673L11.2978 2L5.5 8L11.2978 14Z" 
+              Fill="Black" />
+            </Button>
+            <TextBox x:Name="CurrentIndexTxt" Text="{Binding CurrentIndex, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" Height="32" Width="48" Margin="0,0,8,0" PreviewTextInput="CurrentIndexTxt_PreviewTextInput" HorizontalContentAlignment="Center" VerticalContentAlignment="Center"  InputMethod.IsInputMethodEnabled="False" CommandManager.CanExecute="CurrentIndexTxt_CanExecute"></TextBox>
+            <TextBlock Text="/" FontSize="14" VerticalAlignment="Center" FontFamily="Microsoft YaHei"></TextBlock>
+            <TextBlock Text="{Binding PageCount}" Margin="5,0,0,0" FontSize="14" VerticalAlignment="Center" FontFamily="Microsoft YaHei"></TextBlock>
+            <Button x:Name="NextPageBtn" Height="28" Width="28"  Margin="16,0,0,0" Style="{StaticResource PageButtonStyle}"  Click="PageBtn_Click">
+                <Path Height="16" Width="16" Data="M6.20223 14L5.5 13.2733L10.5955 8L5.5 2.72673L6.20223 2L12 8L6.20223 14Z" 
+              Fill="Black" />
+            </Button>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 332 - 0
Demo/Examples/Compdfkit_Tools/Common/PreviewControl/PreviewControl.xaml.cs

@@ -0,0 +1,332 @@
+using ComPDFKit.PDFDocument;
+using ComPDFKit.PDFPage;
+using ComPDFKit.Viewer.Helper;
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.IO;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+using System.Xml.Linq;
+
+namespace Compdfkit_Tools.PDFControl
+{
+    /// <summary>
+    /// Interaction logic for PreviewControl.xaml
+    /// </summary>
+    public partial class PreviewControl : UserControl, INotifyPropertyChanged
+    {
+        private Point lastMousePosition;
+        private double startVerticalOffset;
+        private double startHorizontalOffset;
+
+        private List<int> _pageIndexList = new List<int>();
+        public List<int> PageRangeList
+        {
+            get => _pageIndexList;
+            set
+            {
+                CurrentIndex = 1;
+                _pageIndexList = value;
+                PageCount = _pageIndexList.Count;
+                PageRangeChanged?.Invoke(this, EventArgs.Empty);
+            }
+        }
+
+        private int _pageCount = 1;
+        public int PageCount
+        {
+            get => _pageCount;
+            set
+            {
+                UpdateProper(ref _pageCount, value);
+            }
+        }
+
+        private int _currentIndex = 1;
+        public int CurrentIndex
+        {
+            get => _currentIndex;
+            set
+            {
+                if (value < 1)
+                {
+                    value = 1;
+                }
+                else if (value > PageCount)
+                {
+                    value = PageCount;
+                }
+                 
+                if (UpdateProper(ref _currentIndex, value))
+                {
+                    OnCurrentIndexChanged();
+                }
+            }
+        }
+
+        private void OnCurrentIndexChanged()
+        {
+            CurrentIndexChanged?.Invoke(this, EventArgs.Empty);
+        }
+
+        private double _scale = 0.3;
+        public double Scale
+        {
+            get => _scale;
+            set
+            {
+                UpdateProper(ref _scale, Math.Min((Math.Max(value, 0.1)), 1));
+            }
+        }
+
+        private WriteableBitmap _imageSource;
+        public WriteableBitmap ImageSource
+        {
+            get => _imageSource;
+            set
+            {
+                UpdateProper(ref _imageSource, value);
+            }
+        }
+
+        private CPDFDocument _document;
+        public CPDFDocument Document
+        {
+            get { return _document; }
+            set
+            {
+                _document = value;
+            }
+        }
+
+        protected double aspectRatio;
+        protected double thumbnailWidth;
+        protected double thumbnailHeight;
+
+        public event EventHandler CurrentIndexChanged;
+        public event EventHandler PageRangeChanged;
+
+
+        public PreviewControl()
+        {
+            InitializeComponent();
+            DataContext = this;
+        }
+
+        public void InitPreview(CPDFDocument document)
+        {
+            Document = document;
+        }
+
+        private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
+        {
+            lastMousePosition = e.GetPosition(ImageSv);
+            startVerticalOffset = ImageSv.VerticalOffset;
+            startHorizontalOffset = ImageSv.HorizontalOffset;
+            Image.CaptureMouse();
+            this.Cursor = Cursors.Hand;
+        }
+
+        private void Image_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
+        {
+            Image.ReleaseMouseCapture();
+            this.Cursor = Cursors.Arrow;
+        }
+
+        private void Image_MouseMove(object sender, MouseEventArgs e)
+        {
+            if (ImageSv.Visibility == Visibility.Visible && Image.IsMouseCaptured)
+            {
+                Point currentMousePosition = e.GetPosition(ImageSv);
+                double deltaVerticalOffset = lastMousePosition.Y - currentMousePosition.Y;
+                double deltaHorizontalOffset = lastMousePosition.X - currentMousePosition.X;
+
+                double newVerticalOffset = startVerticalOffset + deltaVerticalOffset;
+                double newHorizontalOffset = startHorizontalOffset + deltaHorizontalOffset;
+
+                ImageSv.ScrollToVerticalOffset(newVerticalOffset);
+                ImageSv.ScrollToHorizontalOffset(newHorizontalOffset);
+            }
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        protected virtual void OnPropertyChanged(string propertyName = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+
+        protected bool UpdateProper<T>(ref T properValue,
+            T newValue,
+            [CallerMemberName] string properName = "")
+        {
+            if (object.Equals(properValue, newValue))
+                return false; 
+            properValue = newValue;
+            OnPropertyChanged(properName);
+            return true;
+        }
+
+        private void CurrentIndexTxt_PreviewTextInput(object sender, TextCompositionEventArgs e)
+        {
+            TextBox textBox = sender as TextBox;
+            if (textBox != null)
+            {
+                if (!System.Text.RegularExpressions.Regex.IsMatch(e.Text, @"^[0-9]$"))
+                {
+                    e.Handled = true;
+                }
+            }
+        }
+
+        private Thread renderThread = null;
+        public virtual void BeginLoadImageThread(int pageIndex)
+        {
+            if (renderThread != null && renderThread.ThreadState == ThreadState.Running)
+                return;
+            renderThread = new Thread(new ParameterizedThreadStart(LoadImage));
+            if(Document != null)
+            {
+                renderThread.Start(Document.PageAtIndex(pageIndex));
+            }
+        }
+
+        protected readonly object queueLock = new object();
+        protected void LoadImage(object pageObject)
+        {
+            CPDFPage pdfPage = (CPDFPage)pageObject;
+            Size pageSize =DataConversionForWPF.CSizeConversionForSize(pdfPage.PageSize);
+            double ratio = CalculateThumbnailSize(pageSize) * 3;
+            Rect pageRect = new Rect(0, 0, (int)(pageSize.Width * ratio), (int)(pageSize.Height * ratio));
+            byte[] bmpData = new byte[(int)(pageRect.Width * pageRect.Height * 4)];
+            lock (queueLock)
+            {
+                if(pdfPage.IsValid() == false)
+                {
+                    pdfPage = Document.PageAtIndex(pdfPage.PageIndex);
+                }
+                pdfPage.RenderPageBitmapWithMatrix((float)ratio, DataConversionForWPF.RectConversionForCRect(pageRect), 0xFFFFFFFF, bmpData, 0, true);
+            }
+            WriteableBitmap writeableBitmap = new WriteableBitmap((int)pageRect.Width, (int)pageRect.Height, 96, 96, PixelFormats.Bgra32, null);
+            writeableBitmap.WritePixels(new Int32Rect(0, 0, (int)pageRect.Width, (int)pageRect.Height), bmpData, writeableBitmap.BackBufferStride, 0);
+            writeableBitmap.Freeze();
+            Application.Current.Dispatcher.Invoke(new Action(() =>
+            { 
+                ImageSource = writeableBitmap;
+
+            }));
+        }
+
+        private double CalculateThumbnailSize(Size size)
+        {
+
+            if (size.Height / size.Width > aspectRatio)
+            {
+                return (thumbnailWidth) / size.Width;
+            }
+            else
+            {
+                return (thumbnailHeight) / size.Height;
+
+            }
+        }
+
+        private async void UserControl_Loaded(object sender, RoutedEventArgs eventArgs)
+        {
+            if (Document == null)
+            {
+                return;
+            }
+            try
+            {
+                await Dispatcher.InvokeAsync(() =>
+                {
+                    aspectRatio = ImageGd.ActualHeight / ImageGd.ActualWidth;
+                    thumbnailWidth = ImageGd.ActualWidth - 20;
+                    thumbnailHeight = ImageGd.ActualHeight - 20;
+                });
+                CurrentIndexChanged += (s, e) =>
+                {
+                    BeginLoadImageThread(PageRangeList[CurrentIndex - 1] - 1);
+                };
+                PageRangeChanged += (s, e) =>
+                {
+                    BeginLoadImageThread(PageRangeList[CurrentIndex - 1] - 1);
+                };
+                AttachLoaded();
+            }
+            catch (Exception ex)
+            {
+            }
+        }
+
+        virtual public void AttachLoaded()
+        {
+            BeginLoadImageThread(0);
+        }
+
+        private void CurrentIndexTxt_CanExecute(object sender, CanExecuteRoutedEventArgs e)
+        {
+            try
+            {
+                if (e.Command == ApplicationCommands.Paste && Clipboard.ContainsText())
+                {
+                    string checkText = Clipboard.GetText();
+                    if (int.TryParse(checkText, out int value))
+                    {
+                        e.CanExecute = true;
+                    }
+                    e.Handled = true;
+                }
+            }
+            catch (Exception ex)
+            {
+
+            }
+        }
+
+        private void PageBtn_Click(object sender, RoutedEventArgs e)
+        {
+            var button = sender as Button;
+            if (button != null)
+            {
+                if (button.Name == "PrePageBtn")
+                {
+                    CurrentIndex--;
+                }
+                else
+                {
+                    CurrentIndex++;
+                }
+            }
+        }
+
+        private void ScaleBtn_Click(object sender, RoutedEventArgs e)
+        {
+            var button = sender as Button;
+            if (button != null)
+            {
+                if (button.Name == "ZoomInBtn")
+                {
+                    Scale -= 0.1;
+                }
+                else
+                {
+                    Scale += 0.1;
+                }
+            }
+        }
+    }
+}

+ 9 - 1
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/ColorPickerControl.xaml

@@ -89,7 +89,6 @@
                 </Setter.Value>
             </Setter>
         </Style>
-
         <Style x:Key="CustomColorRadioButton" TargetType="{x:Type RadioButton}">
             <Setter Property="HorizontalAlignment" Value="Center"></Setter>
             <Setter Property="VerticalAlignment" Value="Center"></Setter>
@@ -142,6 +141,15 @@
             </Setter>
         </Style>
     </UserControl.Resources>
+    <UserControl.Style>
+        <Style TargetType="{x:Type UserControl}">
+            <Style.Triggers>
+                <Trigger Property="IsEnabled" Value="False">
+                    <Setter Property="Opacity" Value="0.5"/>
+                </Trigger>
+            </Style.Triggers>
+        </Style>
+    </UserControl.Style>
     <Grid>
         <Grid.ColumnDefinitions>
             <ColumnDefinition></ColumnDefinition>

+ 11 - 11
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFArrow/CPDFArrowUI.xaml

@@ -7,7 +7,7 @@
              mc:Ignorable="d" 
              d:DesignHeight="30" d:DesignWidth="115">
     <UserControl.Resources>
-        <ControlTemplate x:Key="ComboxItemTemplate" TargetType="{x:Type ComboBoxItem}">
+        <ControlTemplate x:Key="CmbItemTemplate" TargetType="{x:Type ComboBoxItem}">
             <Border
                     Name="Bd"
                     Padding="{TemplateBinding Control.Padding}"
@@ -91,7 +91,7 @@
                         <Setter Property="Padding" Value="25 0 0 0"></Setter>
                     </Style>
                 </ComboBox.ItemContainerStyle>
-                <ComboBoxItem VerticalAlignment="Center" Height="32" Template="{StaticResource ComboxItemTemplate}">
+                <ComboBoxItem VerticalAlignment="Center" Height="32" Template="{StaticResource CmbItemTemplate}">
                     <Path Fill="#000000" Tag="Line" Height="20">
                         <Path.Data>
                             F1 M40,16z M0,0z M34,7.5L34,7.5 34,8.5 6,8.5 6,7.5z
@@ -99,7 +99,7 @@
                     </Path>
                 </ComboBoxItem>
 
-                <ComboBoxItem  VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource ComboxItemTemplate}">
+                <ComboBoxItem  VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource CmbItemTemplate}">
                     <Path Fill="#000000" Tag="Arrow" Height="20">
                         <Path.Data>
                             F1 M40,16z M0,0z M10.7427521,4.57125354L11.2572479,5.42874646 7.80417468,7.49925354 34,7.5 34,8.5 7.80417468,8.49925354 11.2572479,10.5712535 10.7427521,11.4287465 5.02817468,8 10.7427521,4.57125354z
@@ -107,7 +107,7 @@
                     </Path>
                 </ComboBoxItem>
 
-                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource ComboxItemTemplate}">
+                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource CmbItemTemplate}">
                     <Path Fill="#000000" Tag="CloseArrow" Height="20">
                         <Path.Data>
                             F1 M40,16z M0,0z M11.5,4.11690481L11.4991747,7.49990481 34,7.5 34,8.5 11.4991747,8.49990481 11.5,11.8830952 5.02817468,8 11.5,4.11690481z
@@ -115,7 +115,7 @@
                     </Path>
                 </ComboBoxItem>
 
-                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource ComboxItemTemplate}">
+                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource CmbItemTemplate}">
                     <Path Fill="#000000" Tag="Square"  Height="20">
                         <Path.Data>
                             M11.5,5 L11.5,7.5 L34,7.5 L34,8.5 L11.5,8.5 L11.5,11 L5.5,11 L5.5,5 L11.5,5 Z
@@ -123,7 +123,7 @@
                     </Path>
                 </ComboBoxItem>
 
-                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource ComboxItemTemplate}">
+                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource CmbItemTemplate}">
                     <Path Fill="#000000" Tag="Circle"  Height="20">
                         <Path.Data>
                             M8.5,5 C9.98660106,5 11.2206526,6.08129303 11.4585702,7.50029469 L34,7.5 L34,8.5 L11.4584039,8.50069618 C11.2200781,9.9192103 9.98625501,11 8.5,11 C6.84314575,11 5.5,9.65685425 5.5,8 C5.5,6.34314575 6.84314575,5 8.5,5 Z
@@ -131,7 +131,7 @@
                     </Path>
                 </ComboBoxItem>
 
-                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource ComboxItemTemplate}">
+                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource CmbItemTemplate}">
                     <Path Fill="#000000" Tag="Diamond"  Height="20">
                         <Path.Data>
                             M9,4.29289322 L12.2068932,7.49989322 L34,7.5 L34,8.5 L12.2068932,8.49989322 L9,11.7071068 L5.29289322,8 L9,4.29289322 Z
@@ -139,7 +139,7 @@
                     </Path>
                 </ComboBoxItem>
 
-                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource ComboxItemTemplate}">
+                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource CmbItemTemplate}">
                     <Path Fill="#000000" Tag="Butt"  Height="20">
                         <Path.Data>
                             M7.5,5.5 L7.5,7.5 L34,7.5 L34,8.5 L7.5,8.5 L7.5,10.5 L6.5,10.5 L6.5,5.5 L7.5,5.5 Z
@@ -147,7 +147,7 @@
                     </Path>
                 </ComboBoxItem>
 
-                <ComboBoxItem  VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource ComboxItemTemplate}">
+                <ComboBoxItem  VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource CmbItemTemplate}">
                     <Path Fill="#000000" Tag="RArrow" Height="20" >
                         <Path.Data>
                             M5.58660083,5.07600085 L9.46460189,7.49900085 L34,7.5 L34,8.5 L9.46460189,8.49900085 L5.58660083,10.9239992 L5.05660189,10.0760008 L8.37960136,8 L5.05660189,5.92399915 L5.58660083,5.07600085 Z
@@ -155,14 +155,14 @@
                     </Path>
                 </ComboBoxItem>
 
-                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource ComboxItemTemplate}">
+                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource CmbItemTemplate}">
                     <Path Fill="#000000" Tag="RCloseArrow" Height="20">
                         <Path.Data>
                             M5.5,4.59787618 L10.143,7.49987618 L34,7.5 L34,8.5 L10.143,8.49987618 L5.5,11.4021238 L5.5,4.59787618 Z
                         </Path.Data>
                     </Path>
                 </ComboBoxItem>
-                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource ComboxItemTemplate}">
+                <ComboBoxItem VerticalAlignment="Center" Height="32" VerticalContentAlignment="Center" Template="{StaticResource CmbItemTemplate}">
                     <Path Fill="#000000" Tag="Slash" Height="20">
                         <Path.Data>
                             M9.531981,5.84644661 L10.239087,6.55355339 L9.292447,7.49944661 L34,7.5 L34,8.5 L8.292447,8.49944661 L6.703553,10.0890873 L5.996447,9.38198052 L9.531981,5.84644661 Z

+ 12 - 8
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFFont/CPDFFontUI.xaml.cs

@@ -3,12 +3,16 @@ using System.Collections.Generic;
 using System.ComponentModel;
 using System.Windows;
 using System.Windows.Controls;
+using Compdfkit_Tools.Helper;
 
 namespace Compdfkit_Tools.Common
 {
     public partial class CPDFFontUI : UserControl, INotifyPropertyChanged
     {
-
+        private string regular = LanguageHelper.PropertyPanelManager.GetString("Font_Regular");
+        private string bold = LanguageHelper.PropertyPanelManager.GetString("Font_Bold");
+        private string italic = LanguageHelper.PropertyPanelManager.GetString("Font_Oblique");
+        private string boldItalic = LanguageHelper.PropertyPanelManager.GetString("Font_BoldOblique");
         public event PropertyChangedEventHandler PropertyChanged;
         public event EventHandler FontFamilyChanged;
         public event EventHandler FontStyleChanged;
@@ -157,10 +161,10 @@ namespace Compdfkit_Tools.Common
 
             List<string> fontStyleList = new List<string>()
             {
-                {"Regular" },
-                {"Bold" },
-                {"Italic" },
-                {"Bold and Italic" }
+                regular,
+                bold,
+                italic,
+                boldItalic
             };
             FontStyleComboBox.ItemsSource = fontStyleList;
             FontStyleComboBox.SelectedIndex = 0;
@@ -200,17 +204,17 @@ namespace Compdfkit_Tools.Common
         private void FontStyleComboBox_SelectionChanged(object sender, SelectionChangedEventArgs e)
         {
             FontStyleTextBox.Text = (sender as ComboBox).SelectedItem.ToString();
-            if (FontStyleTextBox.Text == "Regular")
+            if (FontStyleTextBox.Text == regular)
             {
                 IsBold = false;
                 IsItalic = false;
             }
-            else if (FontStyleTextBox.Text == "Italic")
+            else if (FontStyleTextBox.Text == italic)
             {
                 IsBold = false;
                 IsItalic = true;
             }
-            else if (FontStyleTextBox.Text == "Bold")
+            else if (FontStyleTextBox.Text == bold)
             {
                 IsBold = true;
                 IsItalic = false;

+ 31 - 0
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFLocationControl.xaml

@@ -0,0 +1,31 @@
+<UserControl x:Class="Compdfkit_Tools.Common.CPDFLocationControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Compdfkit_Tools.Common"
+             mc:Ignorable="d" 
+             d:DesignHeight="92" d:DesignWidth="239"
+             Loaded="UserControl_Loaded" x:Name="LocationControl">
+    <Grid x:Name="Grid">
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="auto"></ColumnDefinition>
+            <ColumnDefinition></ColumnDefinition>
+        </Grid.ColumnDefinitions>
+        <local:MatrixRadioControl x:Name="MatrixRadioControl" SelectedTag="{Binding SelectedTag, Mode=TwoWay}"></local:MatrixRadioControl>
+        <Grid Grid.Column="1">
+            <Grid.RowDefinitions>
+                <RowDefinition></RowDefinition>
+                <RowDefinition></RowDefinition>
+            </Grid.RowDefinitions>
+            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="4">
+                <TextBlock Text="X" VerticalAlignment="Center" Margin="0,0,8,0"></TextBlock>
+                <local:NumericUpDownControl x:Name="XNumericControl" Height="32" Width="90" Unit="mm" Text="{Binding HorizOffsetValue, Mode=TwoWay}"  Minimum="0" Maxium="99"></local:NumericUpDownControl>
+            </StackPanel>
+            <StackPanel Orientation="Horizontal" Grid.Row="1" HorizontalAlignment="Center" VerticalAlignment="Top" Margin="4">
+                <TextBlock Text="Y" VerticalAlignment="Center" Margin="0,0,8,0"></TextBlock>
+                <local:NumericUpDownControl x:Name="YNumericControl" Height="32" Width="90" Unit="mm"  Text="{Binding VertOffsetValue, Mode=TwoWay}"  Minimum="0" Maxium="99"></local:NumericUpDownControl>
+            </StackPanel>
+        </Grid>
+    </Grid>
+</UserControl>

+ 133 - 0
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFLocationControl.xaml.cs

@@ -0,0 +1,133 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Compdfkit_Tools.Common
+{
+    /// <summary>
+    /// Interaction logic for CPDFLocationControl.xaml
+    /// </summary>
+    public partial class CPDFLocationControl : UserControl, INotifyPropertyChanged
+    {
+        public static readonly DependencyProperty SelectedTagIndexProperty =
+    DependencyProperty.Register("SelectedTagIndex", typeof(int), typeof(CPDFLocationControl), new PropertyMetadata(4));
+        public int SelectedTagIndex
+        {
+            get { return (int)GetValue(SelectedTagIndexProperty) ; }
+            set
+            {
+                SetValue(SelectedTagIndexProperty, value);
+            }
+        }
+
+        private int _selectedTag;
+        public int SelectedTag
+        {
+            get => _selectedTag;
+            set
+            {
+                if(UpdateProper(ref _selectedTag, value))
+                {
+                    SelectedTagIndex = value;
+                }
+            }
+        }
+
+        private string _horizOffsetValue = "0";
+        public string HorizOffsetValue
+        {
+            get => _horizOffsetValue;
+            set
+            {
+                if (string.IsNullOrEmpty(value) )
+                {
+                    return;
+                }
+                if (int.Parse(value) > XNumericControl.Maxium)
+                {
+                    value = XNumericControl.Maxium.ToString();
+                }
+                if (int.Parse(value) < XNumericControl.Minimum)
+                {
+                    value = XNumericControl.Minimum.ToString();
+                }
+                if (UpdateProper(ref _horizOffsetValue, value))
+                {
+                    HorizOffsetChanged?.Invoke(this, EventArgs.Empty);
+                }
+            }
+        }
+
+        private string _vertOffsetValue = "0";
+        public string VertOffsetValue
+        {
+            get => _vertOffsetValue;
+            set
+            {
+                if (string.IsNullOrEmpty(value))
+                {
+                    return;
+                }
+                if (int.Parse(value) > YNumericControl.Maxium)
+                {
+                    value = YNumericControl.Maxium.ToString();
+                }
+                if (int.Parse(value) < YNumericControl.Minimum)
+                {
+                    value = YNumericControl.Minimum.ToString();
+                }
+                if ( !string.IsNullOrEmpty(value) && UpdateProper(ref _vertOffsetValue, value))
+                {
+                    VertOffsetChanged?.Invoke(this, EventArgs.Empty);
+                }
+            }
+        }
+
+        public event EventHandler HorizOffsetChanged;
+        public event EventHandler VertOffsetChanged;
+
+
+        public CPDFLocationControl()
+        {
+            InitializeComponent();
+            DataContext = this;
+        }
+
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        protected virtual void OnPropertyChanged(string propertyName = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+
+        protected bool UpdateProper<T>(ref T properValue,
+    T newValue,
+    [CallerMemberName] string properName = "")
+        {
+            if (object.Equals(properValue, newValue))
+                return false;
+
+            properValue = newValue;
+            OnPropertyChanged(properName);
+            return true;
+        }
+
+        private void UserControl_Loaded(object sender, RoutedEventArgs e)
+        {
+            
+        }
+    }
+}

+ 51 - 0
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFRotationControl.xaml

@@ -0,0 +1,51 @@
+<UserControl x:Class="Compdfkit_Tools.Common.CPDFRotationControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Compdfkit_Tools.Common"
+             mc:Ignorable="d" 
+             d:DesignHeight="32" d:DesignWidth="186">
+    <UserControl.Resources>
+        <Style x:Key="TransparentButtonStyle" TargetType="{x:Type Button}">
+            <Setter Property="BorderThickness" Value="0" />
+            <Setter Property="Height" Value="32"></Setter>
+            <Setter Property="Width" Value="32"></Setter>
+            <Setter Property="Template">
+                <Setter.Value>
+                    <ControlTemplate TargetType="Button">
+                        <Border Name="border" Background="Transparent">
+                            <ContentPresenter />
+                        </Border>
+                        <ControlTemplate.Triggers>
+                            <Trigger Property="IsMouseOver" Value="True">
+                                <Setter TargetName="border" Property="Background" Value="#1a000000" />
+                            </Trigger>
+                            <Trigger Property="IsPressed" Value="True">
+                                <Setter TargetName="border" Property="Background" Value="#5a000000" />
+                            </Trigger>
+                        </ControlTemplate.Triggers>
+                    </ControlTemplate>
+                </Setter.Value>
+            </Setter>
+        </Style>
+    </UserControl.Resources>
+    <Grid HorizontalAlignment="Left">
+        <Grid.ColumnDefinitions>
+            <ColumnDefinition Width="auto"></ColumnDefinition>
+            <ColumnDefinition  Width="auto"></ColumnDefinition>
+        </Grid.ColumnDefinitions>
+        <local:NumericUpDownControl x:Name="NumericUpDownControl" Width="82" Minimum="-360" Maxium="360" Text="{Binding RotationText, Mode=TwoWay}"></local:NumericUpDownControl>
+        <StackPanel Grid.Column="1" Orientation="Horizontal" Margin="8,0,0,0">
+            <Button x:Name="CounterclockwiseBtn"  Style="{StaticResource TransparentButtonStyle}" Click="RotationBtn_Click">
+                <Path HorizontalAlignment="Center" VerticalAlignment="Center" Data="M14.5,0H1.5V16H14.5V0ZM13.5,1V15H2.5V1H13.5ZM6.58579,3.75736L3.75736,6.58579L9.41421,12.2426L12.2426,9.41421L6.58579,3.75736Z" Fill="#001A4E" />
+            </Button>
+            <Button x:Name="ResetBtn"  Style="{StaticResource TransparentButtonStyle}"  Click="RotationBtn_Click">
+                <Path HorizontalAlignment="Center" VerticalAlignment="Center" Data="M14.5 0H1.5V16H14.5V0ZM13.5 1V15H2.5V1H13.5ZM10 4H6V12H10V4Z" Fill="#001A4E" />
+            </Button>
+            <Button x:Name="ClockwiseBtn" Style="{StaticResource TransparentButtonStyle}"  Click="RotationBtn_Click">
+                <Path HorizontalAlignment="Center" VerticalAlignment="Center" Data="M14.5 0H1.5V16H14.5V0ZM13.5 1V15H2.5V1H13.5ZM12.2426 6.58579L9.41421 3.75736L3.75736 9.41421L6.58579 12.2426L12.2426 6.58579Z" Fill="#001A4E" />
+            </Button>
+        </StackPanel>
+    </Grid>
+</UserControl>

+ 103 - 0
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFRotationControl.xaml.cs

@@ -0,0 +1,103 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Compdfkit_Tools.Common
+{
+    /// <summary>
+    /// Interaction logic for CPDFRotationControl.xaml
+    /// </summary>
+    public partial class CPDFRotationControl : UserControl, INotifyPropertyChanged
+    {
+
+        private string _rotationText = "0";
+        public string RotationText
+        {
+            get => _rotationText;
+            set
+            {
+                if (string.IsNullOrEmpty(value))
+                { 
+                    return;
+                }
+
+                int result = 0;
+
+                if (int.TryParse(value, out result))
+                {
+                    if (result > NumericUpDownControl.Maxium)
+                    {
+                        value = NumericUpDownControl.Maxium.ToString();
+                    }
+                    if (result < NumericUpDownControl.Minimum)
+                    {
+                        value = NumericUpDownControl.Minimum.ToString();
+                    }
+                    if (UpdateProper(ref _rotationText, value))
+                    {
+                        RotationChanged?.Invoke(this, EventArgs.Empty);
+                    }
+                } 
+            }
+        }
+
+        public event EventHandler RotationChanged;
+
+        public CPDFRotationControl()
+        {
+            InitializeComponent();
+            DataContext = this;
+        }
+
+        private void RotationBtn_Click(object sender, RoutedEventArgs e)
+        {
+            var btn = sender as Button;
+            if (btn != null)
+            {
+                if (btn.Name == "CounterclockwiseBtn")
+                {
+                    RotationText = (int.Parse(RotationText) + 45).ToString();
+                }
+                else if (btn.Name == "ResetBtn")
+                {
+                    RotationText = "0";
+                }
+                else if (btn.Name == "ClockwiseBtn")
+                {
+                    RotationText = (int.Parse(RotationText) - 45).ToString();
+                }
+            }
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        protected virtual void OnPropertyChanged(string propertyName = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+
+        protected bool UpdateProper<T>(ref T properValue,
+    T newValue,
+    [CallerMemberName] string properName = "")
+        {
+            if (object.Equals(properValue, newValue))
+                return false;
+
+            properValue = newValue;
+            OnPropertyChanged(properName);
+            return true;
+        }
+    }
+}

+ 47 - 0
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFTileControl.xaml

@@ -0,0 +1,47 @@
+<UserControl x:Class="Compdfkit_Tools.Common.CPDFTileControl"
+             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
+             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
+             xmlns:local="clr-namespace:Compdfkit_Tools.Common"
+             mc:Ignorable="d" 
+             d:DesignHeight="72" d:DesignWidth="242"> 
+    <UserControl.Resources>
+        <local:CommonResourceConverter x:Key="CommonResourceConverter" />
+    </UserControl.Resources>
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition></RowDefinition>
+            <RowDefinition></RowDefinition>
+        </Grid.RowDefinitions>
+        <CheckBox x:Name="TileChk" VerticalAlignment="Center" Click="TileChk_Click">
+            <TextBlock  Text="{Binding Converter={StaticResource CommonResourceConverter},ConverterParameter=Chk_Tile}"></TextBlock>
+        </CheckBox>
+        <Grid Grid.Row="1" x:Name="TileGd">
+            <Grid.Style>
+                <Style TargetType="Grid">
+                    <Style.Triggers>
+                        <DataTrigger Binding="{Binding IsChecked, ElementName=TileChk}" Value="False">
+                            <Setter Property="Opacity" Value="0.5"/>
+                            <Setter Property="IsEnabled" Value="False"></Setter>
+                        </DataTrigger>
+                    </Style.Triggers>
+                </Style>
+            </Grid.Style>
+            <StackPanel Orientation="Horizontal">
+                <Canvas Width="16" Height="16" Margin="0,0,4,0">
+                    <Path Fill="Black" Data="M1,4H2V12H1V4ZM4.70703,7.5H11.2952L10.0278,6.23223L10.7349,5.52513L13.2097,8L10.7349,10.4749L10.0278,9.76777L11.2952,8.5H4.70703L5.97487,9.76777L5.26777,10.4749L2.79289,8L5.26777,5.52513L5.97487,6.23223L4.70703,7.5ZM15,4H14V12H15V4Z"/>
+                </Canvas>
+                <local:NumericUpDownControl x:Name="HorizontalNumericControl" Height="32" Width="90"  Margin="0,0,4,0" Minimum="0" Maxium="99" Text="{Binding HorizontalSpacingValue, Mode=TwoWay}" Unit="mm"></local:NumericUpDownControl>
+            </StackPanel>
+            <StackPanel HorizontalAlignment="Right" Orientation="Horizontal">
+                <Canvas Width="16" Height="16"  Margin="0,0,4,0">
+                    <Path Fill="Black" Data="M12,1V2L4,2V1L12,1ZM8.5,4.70703V11.2952L9.76777,10.0278L10.4749,10.7349L8,13.2097L5.52513,10.7349L6.23223,10.0278L7.5,11.2952L7.5,4.70703L6.23223,5.97487L5.52513,5.26777L8,2.79289L10.4749,5.26777L9.76777,5.97487L8.5,4.70703ZM12,15V14H4V15H12Z"/>
+                </Canvas>
+                <local:NumericUpDownControl  x:Name="VerticalNumericControl" Height="32" Width="90"  Margin="0,0,4,0"  Minimum="0" Maxium="99" Text="{Binding VerticalSpacingValue, Mode=TwoWay}" Unit="mm"></local:NumericUpDownControl>
+            </StackPanel>
+
+
+        </Grid>
+    </Grid>
+</UserControl>

+ 132 - 0
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFLocation/CPDFTileControl.xaml.cs

@@ -0,0 +1,132 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using System.Text;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Controls;
+using System.Windows.Data;
+using System.Windows.Documents;
+using System.Windows.Input;
+using System.Windows.Media;
+using System.Windows.Media.Imaging;
+using System.Windows.Navigation;
+using System.Windows.Shapes;
+
+namespace Compdfkit_Tools.Common
+{
+    /// <summary>
+    /// Interaction logic for CPDFTileControl.xaml
+    /// </summary>
+    public partial class CPDFTileControl : UserControl, INotifyPropertyChanged
+    {
+        private bool _fullScreen = false;
+        public bool IsFullScreen
+        {
+            get => _fullScreen;
+            set
+            {
+                if (UpdateProper(ref _fullScreen, value))
+                {
+                    FullScreenChanged?.Invoke(this, EventArgs.Empty);
+                }
+            }
+        }
+
+        private string _verticalSpacingValue = "0";
+        public string VerticalSpacingValue
+        {
+            get => _verticalSpacingValue;
+            set
+            {
+                if (string.IsNullOrEmpty(value))
+                {
+                    return;
+                }
+                if (int.Parse(value) > VerticalNumericControl.Maxium)
+                {
+                    value = VerticalNumericControl.Maxium.ToString();
+                }
+                if (int.Parse(value) < VerticalNumericControl.Minimum)
+                {
+                    value = VerticalNumericControl.Minimum.ToString();
+                }
+                if (!string.IsNullOrEmpty(value) && UpdateProper(ref _verticalSpacingValue, value))
+                {
+                    VerticalSpacingChanged?.Invoke(this, EventArgs.Empty);
+                }
+            }
+        }
+
+        private string _horizontalSpacingValue = "0";
+        public string HorizontalSpacingValue
+        {
+            get => _horizontalSpacingValue;
+            set
+            {
+                if (string.IsNullOrEmpty(value))
+                {
+                    return;
+                }
+                if (int.Parse(value) > HorizontalNumericControl.Maxium)
+                {
+                    value = VerticalNumericControl.Maxium.ToString();
+                }
+                if (int.Parse(value) < HorizontalNumericControl.Minimum)
+                {
+                    value = HorizontalNumericControl.Minimum.ToString();
+                }
+                if (!string.IsNullOrEmpty(value) && UpdateProper(ref _horizontalSpacingValue, value))
+                {
+                    HorizontalSpacingChanged?.Invoke(this, EventArgs.Empty);
+                }
+            }
+        }
+         
+        public event EventHandler FullScreenChanged;
+        public event EventHandler VerticalSpacingChanged;
+        public event EventHandler HorizontalSpacingChanged;
+
+        public CPDFTileControl()
+        {
+            InitializeComponent();
+            DataContext = this;
+        }
+
+        private void TileChk_Click(object sender, RoutedEventArgs e)
+        {
+            var chk = sender as CheckBox;
+            if (chk != null)
+            {
+                if ((bool)chk.IsChecked)
+                {
+                    IsFullScreen = true;
+                }
+                else
+                {
+                    IsFullScreen = false;
+                }
+            }
+        }
+
+        public event PropertyChangedEventHandler PropertyChanged;
+        protected virtual void OnPropertyChanged(string propertyName = null)
+        {
+            PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+        }
+
+        protected bool UpdateProper<T>(ref T properValue,
+    T newValue,
+    [CallerMemberName] string properName = "")
+        {
+            if (object.Equals(properValue, newValue))
+                return false;
+
+            properValue = newValue;
+            OnPropertyChanged(properName);
+            return true;
+        }
+    }
+}

+ 0 - 0
Demo/Examples/Compdfkit_Tools/Common/PropertyControl/PDFOpacity/CPDFOpactiyUI.xaml


Some files were not shown because too many files changed in this diff