using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;
using System.Collections.ObjectModel;

namespace ExpanderSample
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();
            PopulateGrid();
        }

        private void PopulateGrid()
        {
            ObservableCollection<Dataitem> coll = new ObservableCollection<Dataitem>();
            for (int i = 0; i < 100; i++)
            {
                Dataitem item = new Dataitem()
                {
                    Name = "Dataitem" + i,
                    ID = i
                };
                coll.Add(item);
            }
            this.gridView.ItemsSource = coll;
        }
    }

    

    public class Colors : ObservableCollection<Color>
    {
        public Colors()
        {
            base.Add(new Color() { Name = "Red", Hex = "#FF0000" });
            base.Add(new Color() { Name = "Green", Hex = "#00FF00" });
            base.Add(new Color() { Name = "Blue", Hex = "#0000FF" });
            base.Add(new Color() { Name = "Aqua", Hex = "#00GGFF" });
            base.Add(new Color() { Name = "Red", Hex = "#0000FF" });
            base.Add(new Color() { Name = "Yellow", Hex = "#0G00FF" });
            base.Add(new Color() { Name = "White", Hex = "#00GGFF" });
            base.Add(new Color() { Name = "Black", Hex = "#0GG0FF" });
            base.Add(new Color() { Name = "Red", Hex = "#FF0000" });
            base.Add(new Color() { Name = "Green", Hex = "#00FF00" });
            base.Add(new Color() { Name = "Blue", Hex = "#0000FF" });
            base.Add(new Color() { Name = "Aqua", Hex = "#00GGFF" });
            base.Add(new Color() { Name = "Red", Hex = "#0000FF" });
            base.Add(new Color() { Name = "Yellow", Hex = "#0G00FF" });
            base.Add(new Color() { Name = "White", Hex = "#00GGFF" });
            base.Add(new Color() { Name = "Black", Hex = "#0GG0FF" });
            base.Add(new Color() { Name = "Red", Hex = "#FF0000" });
            base.Add(new Color() { Name = "Green", Hex = "#00FF00" });
            base.Add(new Color() { Name = "Blue", Hex = "#0000FF" });
            base.Add(new Color() { Name = "Aqua", Hex = "#00GGFF" });
            base.Add(new Color() { Name = "Red", Hex = "#0000FF" });
            base.Add(new Color() { Name = "Yellow", Hex = "#0G00FF" });
            base.Add(new Color() { Name = "White", Hex = "#00GGFF" });
            base.Add(new Color() { Name = "Black", Hex = "#0GG0FF" });
        }
    }

    public class Color
    {
        public string Name { get; set; }
        public string Hex { get; set; }
    }

}
