Customize the look of the Silverlight Control Toolkit drag / drop

戏子无情 提交于 2019-12-11 12:35:47

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!