Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 89864

Property change does not seem to update datatemplate and view

$
0
0

Hi all,

I am starting out with the wonderful Xamarin Forms and up till now it was pretty smooth sailing. That is always good.

Now I have a problem with my datatemplate in listview not updating a Label to the new value in the viewmodel property.

I use a resourcedictionary to specify my datatemplates and bind to a property in my viewmodel.

In the template I have a label that binds to a property in the viewmodel. It shows the correct value after page load, after I show an actionsheet to choose a different value it looks like the value has been set to zero value (datatemplate label goes black ). In the debugger I can see that the viewmodel has the right value and the change too black seems to indicate something is happening but I am at a loss to figure out what. Going back a page and returning to the page in question all the values are how they should be, so it seems like a refresh issue.

I have a button in the same datatemplate which has its IsVisible and IsEnabled bound to the same viewmodel but a different property and that seems to work fine, leading me to believe that the MVVM light RaisePropertyChanged seems to do its thing. It pops up after the property value is set to true immediately.

Anyone ever see this behaviour before?

I use MMV Light and its RaisePropertyChanged event to indicate change, could this be tripping up the redraw?

This is using Windows Phone BTW and Xamarin Froms 1.4 in Visual Studio 2015 Community edition.


Viewing all articles
Browse latest Browse all 89864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>