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; }
public void UpDate(string str) { List <MenuItem> data = new MenuListData(str); Menu.ItemsSource = data; }