0

As title suggest, i have wpf user control hosted in windows forms application. Text box in user control doesn't seem to accept "Delete" key. Most of other keys are working fine.

Google search pointed to two useful links : Link1 : Not useful as it works only for window and not user control.

Link2 : Not able to follow it completely as i am not much aware about windows messages and its interoperability.

Thanks in advance !

Community
  • 1
  • 1
Ujjwal
  • 386
  • 3
  • 18

2 Answers2

0

Does the key work in WPF project?

If you're using "KeyPress"-event, change it to "KeyDown"-event instead, so it can read "Delete"-key too.

W0lfw00ds
  • 2,018
  • 14
  • 23
  • Not catching any event; since framework should handle the event on its own; What all i want is, whatever user has typed, should get deleted, when delete key is pressed (after selection) – Ujjwal May 15 '14 at 13:36
0

If you are using a different event use the PreviewKeyDown event.

Also, is it working in a normal WF app ?

Georgi-it
  • 3,676
  • 1
  • 20
  • 23