Beispiel #1
0
        private void DraggableTextBox_DragEnter(object sender, DragEventArgs e)
        {
            if (!e.Handled)
            {
                DraggableTextBox receiver = (DraggableTextBox)sender;

                DraggableTextBox element = (DraggableTextBox)e.Data.GetData("Object");

                if (receiver != null && element != null)
                {
                    receiver.Word = element.Word;
                }
            }
        }
Beispiel #2
0
        private void DraggableTextBox_Drop(object sender, DragEventArgs e)
        {
            if (!e.Handled)
            {
                DraggableTextBox draggableTextBox = (DraggableTextBox)sender;

                DraggableTextBox element = (DraggableTextBox)e.Data.GetData("Object");

                if (draggableTextBox != null && element != null)
                {
                    string temp = draggableTextBox.Word;
                    draggableTextBox.Word = element.Word;
                    element.Word          = temp;
                }
            }
        }