private static void OnGroupTableCollectionChangedCallBack( DependencyObject sender, DependencyPropertyChangedEventArgs e) { GroupTableUserControl groupTableUserControl = sender as GroupTableUserControl; ObservableCollection <GroupTypeOrder> groupTypeOrder = (ObservableCollection <GroupTypeOrder>)e.NewValue; groupTableUserControl.GroupTypeOrderCollection = groupTypeOrder; }
private static void OnGroupTableChangedCallBack( DependencyObject sender, DependencyPropertyChangedEventArgs e) { GroupTableUserControl groupTableUserControl = sender as GroupTableUserControl; GroupTypeOrder groupTypeOrder = (GroupTypeOrder)e.NewValue; groupTableUserControl.MyGroupTypeOrder = groupTypeOrder; }
void HandleGroupTableDrop(object sender, DragEventArgs e) { Grid targetGroupTable = e.Data.GetData("System.Windows.Controls.Grid") as Grid; GroupTableUserControl gtUC = (GroupTableUserControl)targetGroupTable.Parent; GroupTypeOrder targetGroupTypeOrder = MyGroupTypeOrder; GroupTypeOrder draggedGroupTypeOrder = gtUC.MyGroupTypeOrder; if (!targetGroupTypeOrder.GroupTypeID.Equals(draggedGroupTypeOrder.GroupTypeID)) { GTViewModel.HandleGroupTableDrop(targetGroupTypeOrder, draggedGroupTypeOrder); } }