Is this the default behavior?

Diposting oleh good reading on Kamis, 25 Januari 2007

Maybe we're doing something wrong...

We have a WPF Window (very exciting, no?) and if we override the OnKeyDown method, if any child has focus, it will not get key events -- it doesn't seem to matter if the event is handled or what child has focus. This is most annoying when the child that has focus is a TextBox of some kind.

To temporarily get around this problem, we added this code:
if (FocusManager.GetFocusedElement(this) is TextBoxBase)
return;

Seems a little overkill to need to do this... i feel like I'm taking crazy pills!

{ 0 komentar... read them below or add one }

Posting Komentar