问题
Is there a way to override the template of or restyle the carrot (and even completely remove as I need in one case)? The carrot being the position marker where the drop will occur. I'd also like the ability to change the icons used during dragging - I've seen an infinity symbol, an arrow, and a strike-through circle, for which all I'd like to use custom icons. Unfortunately, I'm also confused as to when a given icon displays itself.
回答1:
Just reviewing the docs it would appear that the DragDropTarget
has a GetInsertionIndicatorGeometry
which I suspect is responsible for the various symbols shown when dragging.
Hence for you to replace these symbols you will need to inherit the specific target type you are using and override this protected member to inject your own geometries.
来源:https://stackoverflow.com/questions/3762668/customize-the-look-of-the-silverlight-control-toolkit-drag-drop