I have to execute some custom logic when a tile is dragged from xamtilemanager and dropped outside of manager. How should I set up DragDropManager's DragSource and DropTarget to achieve such a functionality?
Regards,
Wojtek
Hello Wojtek,
Thank you for your post. I have been looking into it and it seems that the question that you are having is the same as the one in your other to forum thread that you have posted: https://ko.infragistics.com/community/forums/f/retired-products-and-controls/75098/how-to-handle-dropping-elements-anywhere, to which I have already replied.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Krasimir,
Thanks for the sample, work fine but one thing bothers me. Why dragging looks different when I grab Tile title bar instead of the content of the Tile? In the first case the dragged Tile looks doubled, like there are two Tiles moving along with cursor, and I can't drop it on the ListBox.
Thank you for your reply. I have been looking into the behavior that you have described and the reason for it is that when you dragging the heard of the XamTile, another drag drop operation is triggered. That drag drop operation is responsible for the functionality that allows you to change the position of the tiles in the control, by dragging them onto another XamTiles. You can avoid this behavior by setting the AllowTileDragging property of the NormalModeSettings of the XamTileManager to No and leave the style for the XamTile. Another approach I can suggest is keeping the tile dragging functionality of the XamTileManager and re-tempalting the XamTile. By doing so, you will be able to set one of the inner elements of the template of the XamTile as DragSource and this will allow you to have tile dragging within the XamTileManager by dragging the XamTile’s header and dragging the XamTiles outside of the XamTileManager, by dragging its content area. I have modified the sample application that I have provided you with in order to implement the second approach I have suggested.
I am just checking if you require any further assistance on the matter.