using System.Collections;
using System.Windows;
using System.Windows.Documents;
using System.Windows.Input;
using Telerik.Windows.Controls.GridView;

namespace RowDragDrop
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow
    {

        private FrameworkElement dropIndicator;

        private FrameworkElement DropIndicator
        {
            get
            {
                if ( this.dropIndicator == null )
                {
                    this.dropIndicator = this.TryFindResource("DropIndicator") as FrameworkElement;
                }

                return this.dropIndicator;
            }
        }

        public MainWindow()
        {
            this.InitializeComponent();

            this.GridView.ItemsSource = Customer.GetAll();

            GridViewRowDragDropManager rowDragDropManager = new GridViewRowDragDropManager(this.GridView, this.DropIndicator);
        }
    }
}