This is a migrated thread and some comments may be shown as answers.

ListBox To TileView With Swap and Placeholder

1 Answer 107 Views
TileView
This is a migrated thread and some comments may be shown as answers.
Vivek
Top achievements
Rank 1
Vivek asked on 06 Jun 2013, 01:48 PM
Hi Telerik Team,

    I need suggestion on moving items from listbox to tileview, in which tileview's drag mode is swap and tileview will contain rows and columns of empty placeholder for example like <div>,when items form listbox dragged and droped on this empty placeholder, this empty placeholder gets replaced with dropped item, and within tileview items interchange in swap mode.

Regards,
Vivek Dev

1 Answer, 1 is accepted

Sort by
0
Pavel R. Pavlov
Telerik team
answered on 11 Jun 2013, 07:19 AM
Hello Vivek,

I already answered to this question in your ticket. However, I will post the same answer and attach the same project here, so that others from the community can find it.

Please note that the RadTileView control does not support empty places. Hence, you are not allowed to define empty spaces like placeholders, out of the box. However, you can achieve your goal by defining two different Styles targeting the RadTileViewItems. First Style should define how your placeholder looks like and the second Style should be the default one. You can change these Styles at runtime based on some custom logic (e.g. a property). As you are going to change Styles at runtime it will be best to use our InplicitStyles in combination with the NoXaml dlls (read more).

Note that you can change the DataContext of your placeholder items instead of deleting them and adding new RadTileViewItems on their place. Also, you can restrict the drop operation on the ordinary RadTileViewItems. You can achieve this by setting the AllowDrop property of the RadTileView control to False and bind the AllowDrop property of each RadTileViewItem to property of your business object. By doing so, you will be able to control the drop operation form code.

For your convenience I implemented this approach in the attached project. Please take a look at it and let me know if it works for you.

Regards,
Pavel R. Pavlov
Telerik

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
TileView
Asked by
Vivek
Top achievements
Rank 1
Answers by
Pavel R. Pavlov
Telerik team
Share this question
or