I am working on Universal app actually, I want to call a method in the viewmodel from the view to update the data to display.
In my viewmodel :
public async void GetDateScore(DateTime dt)
{
string date = dt.Date.ToString("yyyyMMdd");
List<Score> scoreList = await HtmlGetterHelper.GetLastNightScore(date);
LastScore = new ObservableCollection<Score>();
for (int i = 0; i < scoreList.Count; i++)
{
LastScore.Add(scoreList[i]);
}
}
I try to call it with base.GetDataScore(DateTime.Today) but it doesn't work.
I don't know if it's possible to call the method with something like this or if I should use the messenger of MVVM?