예제 #1
0
        internal static async Task <ObservableCollection <MasterItem> > SetCategories()
        {
            ObservableCollection <MasterItem> MenuItems = new ObservableCollection <MasterItem>()
            {
            };
            List <string>     cat       = (await Store.SettingClass.GetSettings()).Categories.ToList();
            List <MasterItem> cat_logos = Logic.Masterlogos();

            cat.Sort();
            foreach (string dt in cat)
            {
                MenuItems.Add(new MasterItem()
                {
                    Title = dt, Icon = cat_logos.FirstOrDefault(d => d.Title == dt).Icon
                });
            }
            return(MenuItems);
        }