public CatrobatListViewEventArgs(CatrobatListViewEmptyDummyControl tmpControl, CatrobatListViewDragObject orignalControl, IList <object> addedSelectedItems, IList <object> removedSelectedItems, IList <object> groupedItems) { _tmpControl = tmpControl; _orignalControl = orignalControl; _addedSelectedItems = addedSelectedItems; _removedSelectedItems = removedSelectedItems; _groupedItems = groupedItems; }
private void InitReorderableEmptyDummyControl() { if (_tmpDragContentControl != null) { return; } _tmpDragContentControl = new CatrobatListViewEmptyDummyControl(); _tmpDragContentControl.Opacity = 0; }
private void InitReorderableEmptyDummyControl() { if (_tmpDragContentControl != null) return; _tmpDragContentControl = new CatrobatListViewEmptyDummyControl(); _tmpDragContentControl.Opacity = 0; }
public CatrobatListViewEventArgs(CatrobatListViewEmptyDummyControl tmpControl, CatrobatListViewDragObject orignalControl, IList<object> addedSelectedItems, IList<object> removedSelectedItems, IList<object> groupedItems) { _tmpControl = tmpControl; _orignalControl = orignalControl; _addedSelectedItems = addedSelectedItems; _removedSelectedItems = removedSelectedItems; _groupedItems = groupedItems; }
private void DragTransfer(CatrobatListViewEmptyDummyControl tmpControl, CatrobatListViewDragObject originalContent, IList<object> groupedItems) { int actSourceIndex = Clvw.Items.IndexOf(tmpControl); int actTargetIndex = ((IList)this.ItemsSource).IndexOf(originalContent.Content); if (actTargetIndex != -1 && actSourceIndex != actTargetIndex && (groupedItems == null || groupedItems.Count == 0)) { ((IList)this.ItemsSource).RemoveAt(actTargetIndex); ((IList)this.ItemsSource).Insert(actSourceIndex, originalContent.Content); } else if (actTargetIndex != -1 && groupedItems != null) { ((IList)this.ItemsSource).RemoveAt(actTargetIndex); for (int i = 0; i < groupedItems.Count; i++) { ((IList)this.ItemsSource).Remove(groupedItems[i]); } ((IList)this.ItemsSource).Insert(actSourceIndex, originalContent.Content); for (int i = 0; i < groupedItems.Count; i++) { ((IList)this.ItemsSource).Insert(actSourceIndex + 1, groupedItems[i]); Clvw.Items.Insert(actSourceIndex + 1, groupedItems[i]); } } Clvw.Items[actSourceIndex] = originalContent.Content; }