From f627011802145fc8347c62216599a3ef66a58c47 Mon Sep 17 00:00:00 2001 From: Paddy Xu Date: Mon, 24 Jul 2017 21:41:04 +0300 Subject: [PATCH] fix scrollbar bug --- .../QuickLook.Plugin.PDFViewer/PdfViewerControl.xaml.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/PdfViewerControl.xaml.cs b/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/PdfViewerControl.xaml.cs index 66cc674..e47fb5f 100644 --- a/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/PdfViewerControl.xaml.cs +++ b/QuickLook.Plugin/QuickLook.Plugin.PDFViewer/PdfViewerControl.xaml.cs @@ -160,12 +160,12 @@ namespace QuickLook.Plugin.PDFViewer var bitmap = PdfHandle.GetPage(CurrentPage, factor); var image = bitmap.ToBitmapSource(); bitmap.Dispose(); - - pagePanel.ResetZoom(); + pagePanel.Source = image; + pagePanel.ResetZoom(); _viewRenderFactor = factor; - + pagePanel.SetScrollPosition(pos); Dispatcher.Delay(500, t => GC.Collect());