c# - Combobox text property twoway binding not working -


i have combobox below

<combobox verticalalignment="center"             width="83.84"           canvas.left="626.24"           canvas.top="249.088" datacontext="{binding items[0]}"           text="{binding textvariable, mode=twoway, notifyonvalidationerror=true, targetnullvalue='', validatesondataerrors=true, validatesonexceptions=true}"            height="68.293"            style="{staticresource comboboxdialogcontrolq69_74}" /> 

the problem is: when set value textvariable in view model gets displayed on ui. when change on ui not updated in property.

i think missing obvious, appreciated.

it works when tried doing below text binding on combobox,

text="{binding textvariable, mode=twoway, updatesourcetrigger=lostfocus, notifyonvalidationerror=true, targetnullvalue='', validatesondataerrors=true, validatesonexceptions=true}"  

i have added 1 more property make editable.

iseditable="true" 

if need change on propertychange change updatesourcetrigger propertychanged

updatesourcetrigger=propertychanged 

vm

 public string textvariable {                  { return _textvariable; }         set          {             _textvariable = value;              notifypropertychanged();          }      } 

Comments

Popular posts from this blog

javascript - Karma not able to start PhantomJS on Windows - Error: spawn UNKNOWN -

c# - Display ASPX Popup control in RowDeleteing Event (ASPX Gridview) -

Nuget pack csproj using nuspec -