public CopyPasteOperations()
        {
            Counter = 0;
            InitializeComponent();
            DemoContentGrid.DataContext = this;
            ArrayList list = OutlookDataGenerator.CreateOutlookArrayList(10);

            object[] objectForCopying = list.ToArray();
            for (int i = 0; i < objectForCopying.Length; i++)
            {
                firstList.Add(CopyPasteOutlookData.ConvertOutlookDataToCopyPasteOutlookData((OutlookData)objectForCopying[i], this));
            }
            firstGrid.ItemsSource  = firstList;
            secondGrid.ItemsSource = secondList;
            allowCopyingtoClipboardCheckEdit.IsChecked = true;
            copyHeaderCheckEdit.IsChecked = true;

            firstGrid.PreviewMouseDown  += new MouseButtonEventHandler(firstGrid_PreviewMouseDown);
            secondGrid.PreviewMouseDown += new MouseButtonEventHandler(secondGrid_PreviewMouseDown);
            GridDictionary.Add(FocusedGrid.First, firstGrid);
            GridDictionary.Add(FocusedGrid.Second, secondGrid);
        }
Ejemplo n.º 2
0
 public DragDropViewModel()
 {
     DataSource       = new ObservableCollection <OutlookData>(OutlookDataGenerator.CreateOutlookArrayList(200).Cast <OutlookData>());
     RecycleBinSource = new ObservableCollection <OutlookData>(OutlookDataGenerator.CreateOutlookArrayList(5).Cast <OutlookData>());
     ClearRecycleBin  = new DelegateCommand <Object>(OnClearRecycleBin);
 }