views:

456

answers:

1

I want to draw custom elements (like an empty square> between the items of a listbox, to indicate that users can insert/drop items from another listbox between other items.

How can I do this? I have some rather hacky solution for this, but I hope there is an easier way to do this.
One of the ideas is to use different DataTemplates for items for odd and even indexes in the listbox.

+2  A: 

There is a very elegant solution to this that can be seen here.

(if the link ever goes out of date, as it has once already, a google search on "bea stollnitz drag drop listbox" will probably get you to the right page, if it exists.)

Beska
Thanx for the fast reply, it could be part of the solution. But: I want to draw the line always, even when i'm not hovering above the insertion-spot. This is key to the app, because it will run on a touch screen, and people's fingers will cause people not see the insertion-adorner. Any ideas?
Loy
The code can be modified to do that. The key is to just change when the insertion adorner is rendered from "only sometimes" to "always". I expect it would make the code simpler.
Beska
Hi beska, I'm really interested in your solution but the link seems to be not working. Can you post fresh link.
Amit Chintawar
@Amit: Ah! Thanks for the heads up. I've updated the content to the new link.
Beska