The TextBox control in Windows Ph开发者_如何学运维one 7 Silverlight inserts a period if you press SPACE twice. Is there any high-level way to stop this from happening, or am I going to have to muck about with KeyDown/KeyUp/TextChanged?
The behaviour of altering a double space (when entered in quick succession - like a double click) is dependent on the InputScope
assigned to the TextBox.
After a quick bit of experimentation I know it definitely doesn't happen if you use an InputScope of TelephoneNumber
or Chat
.
Be very careful if trying to alter this and consider the implications of altering standard behaviour. Consider using an InputScope which isn't affected by this first.
If you must override this standard behaviour then you'll also need to consider the frequency of entered characters.
Do you need to allow the user to enter a full stop and then multiple spaces? (possible gotcha/edge-case to consider)
If you must, I think you could implement the override by just using the TextChanged event.
精彩评论