Exemplo n.º 1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            base.OnNavigatedTo(e);
            fileName = (string)e.Parameter;

            Assembly assembly = typeof(FormViewer).GetTypeInfo().Assembly;

            Stream stream = assembly.GetManifestResourceStream($"WoundManagementSystem.Assets.Forms.{fileName}");

            byte[] buffer = new byte[stream.Length];
            stream.Read(buffer, 0, buffer.Length);

            //Loads the PDF document.
            PdfLoadedDocument loadedDocument = new PdfLoadedDocument(buffer);

            PDFViewer.LoadDocument(loadedDocument);
        }