This question has nothing to do with
Update
. With .NET controls (not only for WPF, and not even only for UI), you don't need any special updating, because all required invalidation of the presentation of the controls are performed through their properties. When a property value is changed, the code of the property
setter invokes required
side effect of property assignment.
In case of
System.Windows.Controls.TextBox
, it is updated by assignment a value to its property
string Text
(in particular).
Please see:
http://msdn.microsoft.com/en-us/library/system.windows.controls.textbox.aspx[
^].
This property is all you need to solve the problem. Also, as the property is of the
string
type, and you need to work with
int
, you will need to parse a string to an integer value and present the integer value as a string, so you will need to use
int.Parse
(throws exception in case of invalid numeric format) or
int.TryParse
(returns Boolean value depending on success) and
int.ToString
.
Now, that's really all you need.
—SA