I have an application with requirements that I think are satisfied by XamTileManager, but its defaults are more complex than we need and I need some help changing them to what we'd like to see.
In a nutshell, the main requirements are:
The first requirement is easy enough. I'm using AllowTileDragging="Swap" in XamTileManager.NormalModeSettings and it's working fine.
I understand the second requirement can be done using a custom ControlTemplate for XamTile. My attempt is mostly working and I think I can get it to the point I need, but if there's a simple example showing the "right way", I'd love to see it.
The third requirement is where I'm having trouble. I've found a couple of examples that are close to what I want, but they haven't worked for me. How can I configure XamTileManager/XamTile to allow moving tiles by clicking anywhere on the tile?
Thanks,
NormO.
Hello Norm,
Thank you for contacting Infragistics. The XamTileManager use a row/column implementation. In otherwords the tiles move based on the AllowTileDragging enum. You cannot drag a tile anywhere on screen freely. If you want this type of flexibility then I recommend using our XamDiagram control instead.
You can suggest new product ideas for future versions (or vote for existing ones) at <https://www.infragistics.com/community/ideas>. Submitting your idea will allow you to communicate directly with our product management team, track the progress of your idea at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you. Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. Remember that for your suggestion to be successful, you need other members of the community to vote for it. You can also link back to this thread for additional details.
Let me know if you have any questions.
Michael DiFilippoSoftware DeveloperInfragistics, Inc.
I'm sorry--I guess I didn't explain that very well. Please let me clarify.
The default behavior of XamTileManager is to reposition tiles when the user clicks and drags on the header of the tile. I wish to allow the user to reposition tiles by clicking anywhere on the tile.
Are there any examples of how to do this that you could point me to?
-NormO.
Unfortunately no, there isn't anything out of the box to achieve this requirement. You might be able to address this with either the .net drag drop framework or our own but it's never been tried before. The issue you will run into is the tiles won't actually animate and "lift" from when they're being dragged and since we handle our own drag operations it might conflict.
I have a VS2017 project that almost does what I want and would like someone to look at it. I've tried to attach it to a reply here in a ZIP file, but get an error (twice).
How can I get this to you?
Regards,
You may upload your attachments here:https://filetransfer.infragistics.com/public.php?service=files&t=793c8215e6e5447eb37889165617e69f
I've uploaded a VS2017 project named "XamTileManagerExample" that illustrates where I am right now. It's a WPF app containing a XamTileManager with four tiles.
The default TileHeaderPresenter style has been overridden to eliminate buttons and other things I don't require. Its drag/drop capabilities are unaffected; you can swap tiles by dragging them by their headers.
I also modified the default style of XamTile in an attempt to allow dragging tiles by clicking anywhere on the tile. This idea I'm using is derived from other questions I've seen on your forums, and it almost works.
If you click in the content of Tile 1, you can drag it around but it doesn't drop anywhere. Tile 2 through Tile 4 do not move when you click the content and drag.
Please have someone look at this and let me know if there's anything I can do to get it working.
I see where only the first tile is honored. I think a custom Behavior might suit you better. I started implementing one that I hope might point you in the right direction. It's complicated but basically you would have to remove your current style and handle everything in code behind based on snooping mouse down triggers and see which tile you are clicking on and implementing the drag source on that.
Thanks for the assistance, but it looks like I'll need to use a different implementation for my feature.
Ok, let me know if you need further assistance.