Hi Stefan, I more or less implemented the solution you posted except I used
!((Cell)curvesGrid.ActiveCell).IsEditing
instead of the isEditing flag and CellExitedEditMode callback to determine if the cell was already in edit mode. I am not using Silverlight, so I had to do something else for the conversion from key press to actual character. I am also using a XamCurrencyEditor instead of a textbox, so I had to use:
editor.SelectionStart = editor.TextLength - cursorLocation;
editor.SelectionLength = 0;
instead of the textbox Select() method. the only issue I have left is to figure out how to get the XamCurrencyEditor to display a "-" when the user types it (the editor is bound to a decimal in the background).
As far as the subject of this original post goes, your example works, but I was looking for a less clunky version (the dispatched/thread/sleep part to clear the selection is really getting out there).
Thanks!