PDFsharp & MigraDoc Foundation

PDFsharp - A .NET library for processing PDF & MigraDoc Foundation - Creating documents on the fly
It is currently Thu Mar 28, 2024 2:12 pm

All times are UTC


Forum rules


Please read this before posting on this forum: Forum Rules



Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Thu Mar 14, 2019 3:46 pm 
Offline

Joined: Thu Mar 14, 2019 3:26 pm
Posts: 3
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!


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 14, 2019 3:53 pm 
Offline

Joined: Thu Mar 14, 2019 3:26 pm
Posts: 3
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?


Top
 Profile  
Reply with quote  
PostPosted: Thu Mar 14, 2019 8:28 pm 
Offline
PDFsharp Expert
User avatar

Joined: Sat Mar 14, 2015 10:15 am
Posts: 909
Location: CCAA
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.

_________________
Best regards
Thomas
(Freelance Software Developer with several years of MigraDoc/PDFsharp experience)


Top
 Profile  
Reply with quote  
PostPosted: Mon Jul 01, 2019 12:50 pm 
Offline

Joined: Mon Jul 01, 2019 12:36 pm
Posts: 1
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.


Top
 Profile  
Reply with quote  
PostPosted: Thu Sep 24, 2020 1:41 pm 
Offline
empira Employee

Joined: Tue Sep 15, 2020 10:34 am
Posts: 1
Thanks to schneide.mwe for posting this workaround. Following his strategy we were able to reduce the workaround to a one-liner:

Simply insert "visual.IsHitTestVisible = false;" at line 231 (the line after the creation of visual) in MigraDoc's DocumentPreview.
We will probably include this change in the next MigraDoc release.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 49 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Privacy Policy, Data Protection Declaration, Impressum
Powered by phpBB® Forum Software © phpBB Group