Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using Xamarin.Forms;
- namespace BHS.Utils
- {
- public class MenuListView : ListView
- {
- public MenuListView()
- {
- List<MenuItem> data = new MenuListData();
- ItemsSource = data;
- VerticalOptions = LayoutOptions.FillAndExpand;
- BackgroundColor = Color.Transparent;
- var cell = new DataTemplate(typeof(ImageCell));
- cell.SetBinding(TextCell.TextProperty, "Title");
- cell.SetBinding(ImageCell.ImageSourceProperty, "IconSource");
- ItemTemplate = cell;
- SelectedItem = data[0];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement