RadTileView Photo movement

2 posts, 0 answers
  1. Paul
    Paul avatar
    1 posts
    Member since:
    Sep 2017

    Posted 11 Sep 2017 Link to this post


    I am using the RadTileView to load photos and I set the dragmode to slide, but what happens was, when you drag a photo into a different position the other photos moves in different direction as long there is a vacant slot. Is there a way to control the movement of the other objects(photos) in one direction? let say move side ways going to the right.


    Thank you


    Paul Villarin



  2. Dinko
    Dinko avatar
    1123 posts

    Posted 13 Sep 2017 Link to this post

    Hi Paul,

    Thank you for your interest in RadTileView control.

    The control doesn't support this type of ordering out of the box when you drag a tile view item. You can take a look at the Reordering Tiles help article in our documentation where this feature is further described. However, in order to achieve your requirement, you can implement custom ordering logic. 
    A possible approach could be to do the following:
    • First you can disable the reordering animation (IsItemsAnimationEnabled = "False") and change the drag mode (DragMode = "Swap").
    • Then you can handle the following events: TileDragStarted, PreviewTilePositionChanged, and TileDragEnded to customize the default dragging logic.
    • The TileDragStarted event will set the initial position of the dragged item(DragedElementInitialPosition).
    • The PreviewTilePositionChanged event will set the new position of the dragged item (endPosition).
    • The TileDragEnded event will trigger when the item is dropped and will reorder the items so this is the place to customize the reordering.
    I am attaching sample project which demonstrates this approach. I think this project is good starting point for implementing your final behavior. Please note that with those implementations you will lose the default animation of the tile view. If this doesn't work for you, you can implement your own custom drag and drop logic with our DragDropManager.

    Progress Telerik
    Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which allow you to write beautiful native mobile apps using a single shared C# codebase.
Back to Top