private new void MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { RectText = sender as RectTextUserControl; RectTextUserControl rectText = sender as RectTextUserControl; DataObject dataObj = new DataObject(rectText.RectColour); DragDrop.DoDragDrop(rectText, dataObj, DragDropEffects.Move); }
private void Target_Drop(object sender, DragEventArgs e) { RectTextUserControl rt = RectText; int count = Int32.Parse(rt.Count); count++; rt.Count = count.ToString(); SolidColorBrush scb = (SolidColorBrush)e.Data.GetData(typeof(SolidColorBrush)); Target.Fill = scb; }