Ejemplo n.º 1
0
        protected override void OnPreviewDragOver(RadDragOverEventArgs e)
        {
            base.OnPreviewDragOver(e);

            StackLayoutElement dropTarget    = e.HitTarget as StackLayoutElement;
            TaskElement        draggedObject = e.DragInstance as TaskElement;

            if (draggedObject != null && dropTarget != null && dropTarget != draggedObject.Parent)
            {
                e.CanDrop = true;
            }
        }
Ejemplo n.º 2
0
        protected override void OnPreviewDragDrop(RadDropEventArgs e)
        {
            StackLayoutElement dropTarget    = e.HitTarget as StackLayoutElement;
            TaskElement        draggedObject = e.DragInstance as TaskElement;

            if (draggedObject != null && dropTarget != null)
            {
                draggedObject.Parent.Children.Remove(draggedObject);
                dropTarget.Children.Add(draggedObject);
            }

            base.OnPreviewDragDrop(e);
        }