提问者:小点点

命名空间中不存在Syncfusion PDFViewer


我最近决定在我的一些功能中使用PdfViewer控件。我已经包含了文档中提到的依赖项“

  • Syncfusion.Compression.Base
  • 同步融合.Pdf.Base
  • 同步.PdfViewer.Wpf

这是注册的名称空间:

xmlns:pdfViewer="clr-namespace:Syncfusion.Windows.PdfViewer;assembly=Syncfusion.PdfViewer.WPF"

这就是我在网格中声明控件的方式:

<pdfViewer:PdfDocumentView Name="PdfViewer" AllowDrop="True"></pdfViewer:PdfDocumentView>

当我试图运行应用程序时,我得到了这个错误:

The name "PdfDocumentView" does not exist in the namespace "clr-namespace:Syncfusion.Windows.PdfViewer;assembly=Syncfusion.PdfViewer.WPF".

Visual Studio自动完成控件声明和属性,我甚至可以从XAML文件中看到预览。

有什么想法吗?


共2个答案

匿名用户

客户端配置文件框架不支持同步PDF查看器WPF,请参阅链接支持的框架,这可能是此问题的原因。请切换框架以解决此问题。

关于UG留档,在应用程序中包含PDF查看器需要以下程序集。

  • Syncfusion.Compression.Base
  • Syncfusion.Core
  • Syncfusion.Pdf.Base
  • Syncfusion.PdfViewer.wpf
  • Syncfusion.Shared.wpf

如果您在使用PDF Viewer时仍然遇到任何问题,请联系support@syncfusion.com的Syncfusion支持

此致,Suresh

匿名用户

确保要添加的程序集的.Net版本与项目的.Net版本相同。

要检查右键单击您的项目