Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
165
Disable the XamMaskedEditor command
posted

Hi,

Assume I have a window and XamMaskedEditor within. I want the window to process my own custom command when user presses F2 button.

The problem is that when XamMaskedEditor is focused , each F2 key press is handled inside the control and my custom command is not executed.

Any ideas how to make it work? I need a way to disable F2 processing in XamMaskedEditor.

Parents
  • 9694
    posted

    Hello,

    Fortunately, WPF provides routed event handling. This means you can provide a Preview event handler which will intercept an event before it tunnels down to the child element which the event is intended for. There is a Handled property in the event arguments which you can set to true to stop the event from continuing on its trek. Whatever event you are using for handle the F2 key action, look for a Preview version of the event and try handling that.

    Thanks,

Reply Children