logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

New Topic Post Reply
Options
Go to last post Go to first unread
matt.smokeball  
#1 Posted : Wednesday, June 13, 2018 3:39:38 PM(UTC)
Quote
matt.smokeball

Rank: Member

Groups: Registered
Joined: 4/15/2018(UTC)
Posts: 24
Man
Australia
Location: Sydney

Thanks: 2 times
Hi

We're using the WPF viewer, and everything has been great. I need to detect keyboard ctrl+s in order to save the document. I can detect it find for most places, but it seems the keyboard events don't raise if the focus is on a checkbox or radio button form field (it works for a text box fine).

Just hoping there is a way that we can capture the keyboard event here, or if there is any known way in the viewer/document to respond to a ctrl+s event to save the document?

Thanks
Paul Rayman  
#2 Posted : Wednesday, June 13, 2018 11:48:54 PM(UTC)
Quote
Paul Rayman

Rank: Administration

Groups: Administrators
Joined: 1/5/2016(UTC)
Posts: 1,138

Thanks: 10 times
Was thanked: 133 time(s) in 130 post(s)
I have checked on my document the following

Code:

        protected override void OnPreviewKeyDown(KeyEventArgs e)
        {
            base.OnPreviewKeyDown(e);
        }

Keystrokes are intercepted without any problems. Could you please provide your document and code.
Although I'm sure that the document does cannot affect to the standard UIElement
matt.smokeball  
#3 Posted : Thursday, June 21, 2018 6:34:50 PM(UTC)
Quote
matt.smokeball

Rank: Member

Groups: Registered
Joined: 4/15/2018(UTC)
Posts: 24
Man
Australia
Location: Sydney

Thanks: 2 times
Oh yep. Thanks! I was hooking into the OnPreviewDown event rather than overriding it. That works. Cheers
Quick Reply Show Quick Reply
Users browsing this topic
Guest
New Topic Post Reply
Forum Jump  
You can post new topics in this forum.
You can reply to topics in this forum.
You can delete your posts in this forum.
You can edit your posts in this forum.
You cannot create polls in this forum.
You can vote in polls in this forum.