Turn off Ctrl-Mouse Wheel zooming

2 Answers 7 Views
PDFViewer
Rob
Top achievements
Rank 1
Iron
Iron
Iron
Rob asked on 22 Jul 2025, 09:34 AM
Is there anyway to disable this functionality in the pdf viewer so that I can handle zooming manually?

2 Answers, 1 is accepted

Sort by
0
Stenly
Telerik team
answered on 22 Jul 2025, 11:59 AM

Hello Rob,

To achieve this requirement, you could subscribe to the PreviewMouseWheel event of RadPdfViewer and check if the left or right CTRL key is pressed. If either of them is pressed, set the Handled property of the event arguments to true.

The following code snippet showcases this suggestion's implementation:

private void pdfViewer_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
{
    if (Keyboard.IsKeyDown(Key.LeftCtrl) || Keyboard.IsKeyDown(Key.RightCtrl))
    {
        e.Handled = true;
    }
}

With this being said, could you give this suggestion a try and let me know how it goes?

Regards,
Stenly
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

0
Rob
Top achievements
Rank 1
Iron
Iron
Iron
answered on 22 Jul 2025, 12:03 PM
That solution worked perfectly. Thank you Stenly!
Tags
PDFViewer
Asked by
Rob
Top achievements
Rank 1
Iron
Iron
Iron
Answers by
Stenly
Telerik team
Rob
Top achievements
Rank 1
Iron
Iron
Iron
Share this question
or