c# - Why doesn't ToString work with Data Binding -


following this example (example 2) data binding works , ui updated based on value of artistname.

if xaml binding written this:

<label grid.column="1" grid.row="1" content="{binding}" /> 

instead of

<label grid.column="1" grid.row="1" content="{binding artistname}" /> 

then tostring called on songviewmodel, , if override this:

 public override string tostring()  {      return song.artistname;  } 

the value not updated through databinding. rest of code same in example given in link.

why doesn't value change in case?

wpf binding doesn't work way.

if {binding} way wpf refresh binding reset datacontext. binding has no propertypath follow therefore inotifypropertychanged cannot called refresh kind of binding.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -