DoubleClick from SelectionTool select whole word under mouse

Hello,

i used the pdftron sdk for wpf to build custom tools for pdfs. With the winform sdk it is possible to double click with the selection tool and then the whole word is selected under the mouse. How i can implement this function with the wpf sdk? I search in the
example code of tool library but i found nothing. So i hope you can explain a little bit how can it implemented.

best regards

Daniel

Hi Daniel,

We will be taking a look at that ourselves this week. We should be able to get you a new set of tools later this week.

Best Regards,
Tomas Hofmann

Hello Thomas,

okay then i will be wait for the new toolset. Thank you for your work.

Best Regards
Daniel
Am Donnerstag, 17. Juli 2014 00:17:18 UTC+2 schrieb Tomas Hofmann:

Hi Daniel,

We will be taking a look at that ourselves this week. We should be able to get you a new set of tools later this week.

Best Regards,
Tomas Hofmann

On Wednesday, July 16, 2014 12:34:27 AM UTC-7, Daniel Lutz wrote:

Hello,

i used the pdftron sdk for wpf to build custom tools for pdfs. With the winform sdk it is possible to double click with the selection tool and then the whole word is selected under the mouse. How i can implement this function with the wpf sdk? I search in the
example code of tool library but i found nothing. So i hope you can explain a little bit how can it implemented.

best regards

Daniel

Hi again Daniel,

Attached is a set of tools that handle double clicking. Shift clicking after double clicking works as well.
Please let us know if this does what you want it to do.

A few pointers about how the selection was done (in case you want to edit it, or for future reference).
Doing Text selection on the PDFViewWPF (or any of our PDFViewCtrls) with rectangular selection always select a whole word. So what I did was I added an override to the DoubleClickHandler in the TextSelectStructural tool, which did a text selection on a very small rectangle at that spot. If there’s a word there, it will be selected. (We use the same selection method when users tap or long press on text on our mobile platforms to select the first word).
The trick now is to make sure that the other events, such as MouseLeftButtonDown/Up don’t do anything they shouldn’t be doing after a double click.

Best Regards,
Tomas Hofmann

Right… and the attachment.

PDFViewWPFTools.zip (110 KB)