using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices.WindowsRuntime;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;

// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236

namespace FlexGridSamples.View
{
    public sealed partial class DragDropRows : UserControl
    {
        public DragDropRows()
        {
            this.InitializeComponent();
            for (int i = 0; i < 100; i++)
            {
                _flex.Columns.Add(new C1.Xaml.FlexGrid.Column() { Header = i.ToString() });
            }
            for (int j = 0; j < 100; j++)
            {
                _flex.Rows.Add(new C1.Xaml.FlexGrid.Row());
            }
            for (int row = 0; row < _flex.Rows.Count; row++)
            {
                for (int col = 0; col < _flex.Columns.Count; col++)
                {
                    _flex[row, col] = string.Format("[{0}, {1}]", row.ToString(), col.ToString());
                }
            }
            _flex.AllowDragging = C1.Xaml.FlexGrid.AllowDragging.Both;
            _flex.AllowSorting = false;
        }
    }
}
