Is It possible to have multiple selection on Dragable List box ? If yes how ?
Also, How can this possible for custom control like If I have 2 images in grid and i want to move both together at a same time
I would say this might be admin question.
Thanks in advance.
2 Answers, 1 is accepted
answered on 19 Mar 2009, 12:46 PM
Sorry for the delayed reply,
The example with the Draggable ListBox just shows how you can augment a control with drag-drop. Basically when the drag starts, you choose what elements will be dragged, so it will also work with multiple selected elements.
Unfortunately the default ListBox, used in the example does not support multiple selection and there is no easy way to add this.
The drag/drop though can be added to almost any control (excluding these which capture the mouse, like buttons), so it will be possible to drag elements form any control that supports multiple selection.
For your second question: When the drag starts, you can add anything in the DragCue, including the whole grid with the two images.
If you do not like to modify the visual tree and you are looking to move elements around like on a design canvas, you can make the draggable elements drag sources (AllowDrag=True) and the design canvas (a parent canvas panel) the drag destination. Then on every drop query you will set the Canvas.Left and Canvas.Top for the dragged object.