Example #1
0
        private void LoadData()
        {
            listaGrupos = Agrupamento <Bar> .CriaGrupos(App.bares,
                                                        Thread.CurrentThread.CurrentUICulture,
                                                        (Bar s) => { return(s.nome); }, true);

            listaItens.ItemsSource = listaGrupos;

            LoadBairros();
        }
Example #2
0
        private void LoadBairros()
        {
            List <string> bairros = new List <string>();

            foreach (Bar bar in App.bares)
            {
                if (!bairros.Exists(b => b.Equals(bar.bairro)))
                {
                    bairros.Add(bar.bairro);
                }
            }

            gpBairros = Agrupamento <string> .CriaGrupos(bairros,
                                                         Thread.CurrentThread.CurrentUICulture,
                                                         (string s) => { return(s); }, true);

            listaBairros.ItemsSource = gpBairros;
        }