Hi,
I have a UltraTextEditor without any propertys set. The editor is bound to a string property of an object.
If I click in the text box and then click somewhere else, the text box loses his focus as expacted. If I click into the text box, type some text in there and remove the text after that, I can not lose the focus.
I already registered the "BeforeExitEditMode" - event to ensure that the "Cancel" flag of the eventargs is false but it doesn't work.
Has someone an idea?
It sounds to me like your data source can't accept an empty string. Try setting the Visual Studio IDE to break on all run-time exceptions and see if any are occurring that might be hidden.
If I am right, then you might be able to get around this by handling the Parse event of the Binding. I think there might also be properties on the Binding that control how empty string or null are interpreted.
If that doesn't help, I recommend that you try the same thing with a TextBox and see if you get any different results.
What exactly are you trying to do? The UltraTextEditor does not lose focus if the end user deletes all the text in it; you have to switch focus from that control to another in order for it to lose focus and exit edit mode. BeforeExitEditMode only fires if the control is exitign edit mode; deleting all of the text in the control does not mean it is no longer in edit mode.
~Kim~