I try to use the PdfViewer in an addin (using the .net managed addin framework), hosted in a winform host application. When I open a pdf file I get this exception:
at Telerik.Windows.Documents.Fixed.FormatProviders.Pdf.Utils.Helper.get_Dispatcher() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Documents\Fixed\Core\FormatProviders\Pdf\Utils\Helper.cs:line 25
at Telerik.Windows.Documents.Fixed.FixedDocumentStreamSource.<>c__DisplayClass8.<LoadDocument>b__6() in c:\TB\105\WPF_Scrum\Release_WPF\Sources\Development\Documents\Fixed\FixedDocumentViewers\Fixed\FixedDocumentStreamSource.cs:line 180
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
I suspect the helper class is using Application.Current.Dispatcher. Application.Current is null in our environment.
Is there a work around for this problem so I can use the viewer in an addin?
Thank you,
Fonger.