using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommonHelpers.Common;
using Telerik.XamarinForms.DataControls.ListView;
using Xamarin.Forms;

namespace ImageUriTest
{
    public partial class MainPage : ContentPage
    {
        public MainPage()
        {
            InitializeComponent();
            BindingContext = new ViewModel();
        }

        private void Results_ItemTapped(object sender, ItemTapEventArgs e)
        {

        }
    }

    public class ViewModel : ViewModelBase
    {
        public ViewModel()
        {
            for (int i = 1; i < 9; i++)
            {
                VolumeList.Add(new Volume
                {
                    SpeakerName = $"Speaker {i}",
                    VolumeSubject = $"Subject {i}",
                    ImageUrl = $"https://progressdevsupport.blob.core.windows.net/demo-images/NumberedSampleImages/Image_0{i}.jpg"
                });
            }
        }

        public ObservableCollection<Volume> VolumeList { get; set; } = new ObservableCollection<Volume>();
    }

    public class Volume : BindableBase
    {
        public string ImageUrl { get; set; }
        public string VolumeSubject { get; set; }
        public string SpeakerName { get; set; }
    }
}
