Creating a DragQuery method for setting the drag cue only seems to work when dragging the contents. When dragging the header the drag image is alway the TileViewItem itself. This method is called but has no effect.
private void TileViewDragQuery(object sender, DragDropQueryEventArgs e)
{
try
{
if (e.Options.Status == DragStatus.DragQuery)
{
e.QueryResult = true;
e.Handled = true;
e.Options.Payload = sender as FrameworkElement;
e.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue();
// Create Drag Cue
// Create a ContentControl. It will be used as a DragCue.
ContentControl dragCue = new ContentControl();
// Use a DataTemplate to "say" how the dragged item will be displayed.
dragCue.ContentTemplate = mainGrid.Resources["DragCueTemplate"] as DataTemplate;
e.Options.DragCue = dragCue;
}
else if (e.Options.Status == DragStatus.DropSourceQuery)
{
e.QueryResult = true;
e.Handled = true;
}
}
catch (Exception)
{
throw;
}
}
private void TileViewDragQuery(object sender, DragDropQueryEventArgs e)
{
try
{
if (e.Options.Status == DragStatus.DragQuery)
{
e.QueryResult = true;
e.Handled = true;
e.Options.Payload = sender as FrameworkElement;
e.Options.ArrowCue = RadDragAndDropManager.GenerateArrowCue();
// Create Drag Cue
// Create a ContentControl. It will be used as a DragCue.
ContentControl dragCue = new ContentControl();
// Use a DataTemplate to "say" how the dragged item will be displayed.
dragCue.ContentTemplate = mainGrid.Resources["DragCueTemplate"] as DataTemplate;
e.Options.DragCue = dragCue;
}
else if (e.Options.Status == DragStatus.DropSourceQuery)
{
e.QueryResult = true;
e.Handled = true;
}
}
catch (Exception)
{
throw;
}
}