Forum Xamarin.Forms

Refresh data in View->ViewModel binding initialized from Page.

BoVisfeldtBoVisfeldt DKMember ✭✭
edited February 2017 in Xamarin.Forms

Hi there.
Simplified, We have a App with:

  • A view with a Label
  • A viewmodel that has a DateTime property.

They are bound with a valueconverter that convertes the DateTime into local text, like "Tomorrow at 14.46".
The problem is, that when midnight is reached, the data is not updated to show "Today at 14.46" as the datasource has not changed.

Ofcourse, at midnight, we could throw a PropertyChanged event in the viewmodel, but we would prefer not to as
the data really haven't changed, - only the representation of it.

Therefore, i would like to know if there is a way to force a view to refetch the data it is bound to?

Sign In or Register to comment.