Last Updated:
27 Jun 2019 10:32
by ADMIN
PdfViewer: NullReferenceException is thrown when page content is unloaded due to raise condition in FixedDocumentSinglePagePresenter class
When the FixedDocumentSinglePagePresenter content control is used to visualize PDF files in custom PDF viewer implementation a raise condition can be occurred leading to NullReferenceException with the following stack trace:
at Telerik.Windows.Documents.Fixed.UI.UIElementsHelper.FillPageContentElementsInPanel(Canvas container, RadFixedPage page)
at Telerik.Windows.Documents.UI.FixedDocumentSinglePagePresenter.CreateContent(RadFixedPage page)
at Telerik.Windows.Documents.UI.FixedDocumentSinglePagePresenter.PageLoader_WorkCompleted(Object sender, WorkCompletedEventArgs e)
at Telerik.Windows.Documents.Utilities.ResourceLoader.OnWorkCompleted(WorkCompletedEventArgs args)
at Telerik.Windows.Documents.Utilities.ResourceLoader.Worker_RunWorkerCompleted(Object sender, RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.OnRunWorkerCompleted(RunWorkerCompletedEventArgs e)
at System.ComponentModel.BackgroundWorker.AsyncOperationCompleted(Object arg)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
The exception is thrown since the current page is unloaded while the content is being parsed.