I am using the PdfViewer control within a MahApps / MaterialDesign in XAML application. I turned off the toolbar in the WPF control and was just checking out the view before implementing further functionality.
The application crashed on a NullReference exception in CustomVPanel.cs, CustomVPanel_MouseLeftButtonUp.
The very last switch case (for "FitH"):
Snippetif (pdfArray2.Elements.Count > 2)
{
x = (pdfArray2.Elements[2] as PdfNumber).FloatValue;
}
The pdfArray2 has 5 elements, but elements 2, 3, and 4 are all PdfNull - which as you can see from the code above will not work.