c# - Set TextBox Text programmatically and update the model -
i'm updating textbox.text
value in c# model binded wasn't updated. when update visually works (commenting line mytextbox.text="new value";
, inputing manually value @ runtime)
<textbox name="mytextbox" text="{binding myvalue}"/>
in view model need call notify of property changed binding value.
private string _myvalue; public string myvalue { { return _value; } set { _myvalue = value; notifyofpropertychanged("myvalue"); } }
Comments
Post a Comment