wpfscrollpdfnet

Scrolling in Sticky Notes


I got the following sticky note example:

enter image description here

If the sticky note has more than 9 rows, the additional rows are not visible. I'm able to navigate through the note with my arrow keys. If I'm going to scroll with the mouse wheel, it seems to ignore the popup and just changes the page.

Is it possible to activate scrolling for sticky note popups?


Solution

  • Edit:The solution outlined below will soon be available as part of the samples included in the PDFTron SDK download. In the meanwhile, I hope that the below solution helps.

    Yes, it is possible to activate scrolling for sticky notes.

    The problem is most apparent when using the single page view. It appears to work as expected in continuous mode.

    However it is not as simple as setting VerticalScrollVisibility = ScrollBarVisibility.Auto;. There are a few files that need to be modified to get this working.

    The good news is that we can get the expected behaviour by modifying the code in the provided samples.

    Solution

    The solution is to add some handling for the PreviewMouseWheel event coming from the PDFViewWPF class.
    In the downloaded samples, the following changes were made to get things running as expected:

    By doing the above, we are giving the NoteManager a chance to handle the PreviewMouseWheel before doing anything else with it.

    Another point to note is that we have to now "do the scrolling" in code, using the mTextBox.ScrollToVerticalOffset method in the NoteHost class.