Hello Telerik team!
I get the following exception when I try to assign a presenter to RadPdfViewer.FixedDocumentPresenter field:
System.NullReferenceException was unhandled
HResult=-2147467261
Message=Ссылка на объект не указывает на экземпляр объекта.
Source=Telerik.Windows.Controls.FixedDocumentViewers
StackTrace:
Telerik.Windows.Controls.FixedDocumentViewerBase.UpdateContentPresenter(IFixedDocumentPresenter presenter)
Telerik.Windows.Controls.FixedDocumentViewerBase.InitializeFixedDocumentPresenter(IFixedDocumentPresenter releasedPresenter, IFixedDocumentPresenter presenter)
Telerik.Windows.Controls.FixedDocumentViewerBase.set_FixedDocumentPresenter(IFixedDocumentPresenter value)
...Internal app methods...
InnerException:
Steps before the exception:
<code>
pdfStream = new MemoryStream();
byte[] pdfCashe = File.ReadAllBytes(_pageView.LocalImagePath);
var ms = new MemoryStream(pdfCashe);
pdfViewer.DocumentSource = new PdfDocumentSource(ms);
...
pdfViewer.FixedDocumentPresenter =
pdfViewer.GetRegisteredPresenter(FixedDocumentPresenterNames.FixedDocumentSinglePageViewPresenter);
</code>
pdfViewer - RadPdfViewer initialized in XAML
_pageView.LocalImagePath is a string containing a path to the pdf file
The "DocumentSource" field of the viewer is not null, a "Document" field inside is null.
What could be the cause? The creation of a new FixedDocumentSinglePageViewPresenter itself completes successfully.
I use 2015.3.1104.40 Telerik libraries.
Thank you in advance!