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

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -