Hi all,
I have the following issue with the Entry control on WinRT (only).
If you override the Entry.TextChanged method (or use a Behaviour to do the same thing) when you amend the Entry.Text value, that value is not reflected in the UI.
For instance, if you have the following (simplified) code and someone types in 123A, in WinPhone it changes the display back to 123. In WinRT it stays as 123A.
private void entry_TextChanged(object sender, TextChangedEventArgs e)
{
Entry entry = sender as Entry;
int val;
// check if this is numeric
if (!int.TryParse(e.NewTextValue, out val))
{
// put the old value back.
entry.Text = e.OldTextValue;
}
}
Note that the VALUE of the control IS changing, it is just the UI that is not.
Does anyone have a workaround for this? I have been trying to beat this for over a day now and am getting nowhere. My client doesn't want to change the UI as their users are used to the current behaviour...
Cheers.