Hello @Carlo Goretti ,
Welcome to our Microsoft Q&A platform!
In order to update the view at runtime, the model class should implement INotifyPropertyChanged
interface to raise the PropertyChanged
event when a property is changed. In your project, please make the 'CurrentDay' parameter to raise the PropertyChanged
event in the model class.
Check the code:
public class CustomModel : INotifyPropertyChanged
{
private string currentDay;
public string CurrentDay
{
get
{
return currentDay;
}
set
{
if (currentDay != value)
{
currentDay = value;
NotifyPropertyChanged();
}
}
}
...
protected virtual void NotifyPropertyChanged([CallerMemberName] string propertyName = "")
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
public event PropertyChangedEventHandler PropertyChanged;
}
Best Regards,
Jarvan Zhang
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.