PDFsharp & MigraDoc Foundation
https://forum.pdfsharp.net/

Buggy scrolling in WPF DocumentPreview Control
https://forum.pdfsharp.net/viewtopic.php?f=3&t=3933
Page 1 of 1

Author:  josh2112 [ Thu Mar 14, 2019 3:46 pm ]
Post subject:  Buggy scrolling in WPF DocumentPreview Control

There is a bug with mouse wheel scrolling in the WPF DocumentPreview Control was first referenced in two posts Thomas Hoevel on May 10, 2012:

Quote:
This works with the WPF build of the Document Viewer (there's a little bug: scrolling stops when the mouse cursor is over text; keep the mouse cursor over an empty area (e.g. page margin) and scrolling will work).
https://forum.pdfsharp.net/viewtopic.php?f=2&t=302#p5778

Quote:
This works with the WPF build of the Document Viewer (there's a little bug: scrolling stops when the mouse cursor is over text; keep the mouse cursor over an empty area (e.g. page margin) and scrolling will work).
https://forum.pdfsharp.net/viewtopic.php?f=4&t=2013#p5779

That was almost 7 years ago, there has been no news since, and it's still not fixed in the latest PDFsharp-MigraDoc-wpf NuGet package (1.50.5147). My customers have mentioned it several times as an annoyance.

Is there a place where I can submit or elevate this bug? Or better yet, release the code so I can fix it myself?

Thanks!

Author:  josh2112 [ Thu Mar 14, 2019 3:53 pm ]
Post subject:  Re: Buggy scrolling in WPF DocumentPreview Control

Well I"m happy to find the source code available on Sourceforge: https://sourceforge.net/projects/pdfsharp/files/pdfsharp/PDFsharp%201.50%20%28beta%205%29/

I will look at it and attempt a fix. Is there any way to publish my fix besides posting it here on the board?

Author:  TH-Soft [ Thu Mar 14, 2019 8:28 pm ]
Post subject:  Re: Buggy scrolling in WPF DocumentPreview Control

josh2112 wrote:
Well I"m happy to find the source code available on Sourceforge
Check GitHub for newer source versions:
https://github.com/empira/PDFsharp

Publish the changed files here if you resolved the issue with the current source files. Always good to have a working sample that allows to try the changes before merging them.

Author:  schneide.mwe [ Mon Jul 01, 2019 12:50 pm ]
Post subject:  Re: Buggy scrolling in WPF DocumentPreview Control

I found a work-around or fix, depending on how you look at it. However, it requires modification of the MigraDoc source, or your own DocumentPreview UserControl:

Replace the DrawingVisual used in MigraDoc's DocumentPreview (line 216) by a custom subclass that returns null for both of its HitTestCorefunctions! That will make your mouse stop hitting the stuff rendered on the visual and hence make it possible to scroll everywhere. I do not know what that is actually meant for - I'm guessing for selecting and marking text, but that does not seem to work anyways and should ideally not affect the mouse-wheel.

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/