Пример #1
0
        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);
        }
Пример #2
0
        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;
        }