3 Answers, 1 is accepted
0
Hi Jessie,
Thank you for writing.
For the purpose, you should use the DragDropService of RadListView. Here is a small example to get you started:
I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.
Regards,
Stefan
Telerik
Thank you for writing.
For the purpose, you should use the DragDropService of RadListView. Here is a small example to get you started:
private
void
DragDropService_PreviewDragDrop2(
object
sender, RadDropEventArgs e)
{
if
(radPanorama1.ShowGroups)
{
TileGroupElement hoveredGroup = radPanorama1.ElementTree.GetElementAtPoint(e.DropLocation)
as
TileGroupElement;
if
(hoveredGroup !=
null
)
{
RadTileElement newTile =
new
RadTileElement();
newTile.Text = ((SimpleListViewVisualItem)e.DragInstance).Data.Text;
hoveredGroup.Items.Add(newTile);
//newTile.row
//newTile.Column
//newTile.RowSpan
//newTile.ColSpan
}
RadTileElement hoveredTile = radPanorama1.ElementTree.GetElementAtPoint(radPanorama1.PointToScreen(e.DropLocation))
as
RadTileElement;
if
(hoveredTile !=
null
)
{
TileGroupElement tileGroup = hoveredTile.FindAncestor<TileGroupElement>();
if
(tileGroup !=
null
)
{
RadTileElement newTile =
new
RadTileElement();
newTile.Text = ((SimpleListViewVisualItem)e.DragInstance).Data.Text;
tileGroup.Items.Add(newTile);
}
}
RadPanoramaElement hoveredControl = radPanorama1.ElementTree.GetElementAtPoint(radPanorama1.PointToScreen(e.DropLocation))
as
RadPanoramaElement;
if
(hoveredControl !=
null
)
{
RadTileElement newTile =
new
RadTileElement();
newTile.Text = ((SimpleListViewVisualItem)e.DragInstance).Data.Text;
hoveredControl.Items.Add(newTile);
}
}
else
{
RadTileElement newTile =
new
RadTileElement();
newTile.Text = ((SimpleListViewVisualItem)e.DragInstance).Data.Text;
radPanorama1.Items.Add(newTile);
}
}
I hope that you find this information useful. Should you have any other questions, do not hesitate to contact us.
Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
0
jesse
Top achievements
Rank 1
answered on 27 Jul 2015, 05:28 PM
Thank you, this was most helpful. The only issue i have now is that when there are several tiles in a group, moving them is *very* slow. Is there a way to improve that by maybe turning off the animation?
0
Hello Jesse,
I am unable to replicate slow down with the tiles in the panorama. Attached you can find the project I've tested with. Can you have a look at it and let me know if I am missing something?
I am looking forward to your reply.
Regards,
Stefan
Telerik
I am unable to replicate slow down with the tiles in the panorama. Attached you can find the project I've tested with. Can you have a look at it and let me know if I am missing something?
I am looking forward to your reply.
Regards,
Stefan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items