i have the following code in WPA, and i am trying to convert it to WPF. I tried Keydown instead of Keypress and changed, for example,
(e.keyChar == \'-\')
You're looking for the TextInput event, or perhaps PreviewTextInput.
The EventArgs type is TextCompositionEventArgs; I believe you want the Text property here, but I'm not at all sure of that.
Text