private void refresh() { var freshData = FactsData.GetFacts(true); Title = freshData.title; //initialize at the launch Facts = new ObservableCollection <Fact>(freshData.rows); }
public MainViewModel() { mdata = FactsData.GetFacts(true); Title = mdata.title; RefreshCommand = new Command(() => { refresh(); }); SortCommand = new Command(() => { sort(); }); Facts = new ObservableCollection <Fact>(mdata.rows); }