public MainPageViewModel(INavigationService n) : base(n) { Task.Factory.StartNew(() => { ComposerList.AddRange(AssemblyFileReader.ReadLocalJson <List <Composer> >("music.json")); }); }
public override async Task NavigatedToAsync(object parameter = null) { await base.NavigatedToAsync(parameter); if (RadioList.Count == 0) { var radios = AssemblyFileReader.ReadLocalJson <List <RadioItem> >("radio.json"); Device.BeginInvokeOnMainThread(() => { RadioList.AddRange(radios); }); } }