public SelectAziende() { InitializeComponent(); /* System.Threading.Tasks.Task.Factory.StartNew(async () => * { * ads = await ManagerDefine<BackList<Admin>>.manager.GetTasksAsync(Constants.listAdminUrl); * aziende = ads.data;*/ SelectedData = new List <SelectableData <ExampleData> >(); for (int a = 0; a < Constants.aziende.Count; a++) { SelectableData <ExampleData> s; SelectedData.Add(s = new SelectableData <ExampleData>() { Data = new ExampleData() { NomeAzienda = Constants.aziende.ElementAt(a).nome } }); s.Selected = Constants.CurrentUser.valAz.ElementAt(a); } BindingContext = new MultiSelectViewModel(SelectedData); // }); }
public Popup_Partecipanti() { InitializeComponent(); AssegnaPresenze(); SelectedData = new List <SelectableData <ExampleDataPresenze> >(); for (int a = 0; a < listaPartecipanti.Count(); a++) { SelectableData <ExampleDataPresenze> s; SelectedData.Add(s = new SelectableData <ExampleDataPresenze>() { Data = new ExampleDataPresenze() { Nome = listaPartecipanti.ElementAt(a).ElementAt(0) + " " + listaPartecipanti.ElementAt(a).ElementAt(1) } }); bool p = bool.Parse(listaPartecipanti.ElementAt(a).ElementAt(2)); s.Selected = p; } BindingContext = new MultiSelectViewModelPresenze(SelectedData); }