Hi, I hope someone can help me with this one, I suspect I am doing something stupid. I have bound a textbox so that the Text is bound to 'InputValue'. Basically, when the text value changes I have a method (Inches.Parse), which examines the value and returns a well formatted string.
If there are no errors with the parsing I want the textbox to have the well formatted string called "result". However, the textbox wont show the new text? Any help would be appreciated.
public string InputValue
{
get
{
return _inputValue;
}
set
{
if (_inputValue != value)
{
bool error;
string result = Inches.Parse(value, 64, out error);
if (error != IsValid)
{
IsValid = error;
}
if (!error)
{
_inputValue = result;
}
else
{
_inputValue = value;
}
NotifyPropertyChanged("InputValue");
}
}
}