Ejemplo n.º 1
0
        public MenuListView(string str)
        {
            List <MenuItem> data = new MenuListData(str);

            ItemsSource         = data;
            VerticalOptions     = LayoutOptions.FillAndExpand;
            BackgroundColor     = Color.Transparent;
            SeparatorVisibility = SeparatorVisibility.None;


            var cell = new DataTemplate(typeof(MenuCell));

            cell.SetBinding(MenuCell.TextProperty, "Title");

            //cell.SetBinding (MenuCell.DetailProperty, "Des");
            cell.SetBinding(MenuCell.ImageSourceProperty, "IconSource");



            ItemTemplate = cell;
        }
Ejemplo n.º 2
0
        public void UpDate(string str)
        {
            List <MenuItem> data = new MenuListData(str);

            Menu.ItemsSource = data;
        }