Hey,
I am using a DragDropManager to drag images from a itemscontrol onto a table.
Now I want to rotate the image, if the user presses the Key "R" during Dragging.
But I dont get it to work.
All Input Bindings on the Window and DataTemplate did not fire.
Does anyone have an idea to achieve what I want?
DragDropManager.AddDragInitializeHandler(icImages, OnDragInitialize);
private void OnDragInitialize(object sender, DragInitializeEventArgs e)
{
clsImage imageData = (clsImage)((FrameworkElement)e.OriginalSource).DataContext;
DragDropData dragData = new DragDropData
{
ImageData = imageData ,
Column = Column
};
e.Data = dragData;
e.DragVisual = new ContentControl { ContentTemplate = LayoutRoot.Resources["ImageTemplate"] as DataTemplate, Content = imageData };
e.AllowedEffects = DragDropEffects.All;
e.Handled = true;
}
<DataTemplate x:Key="ImageTemplate">
<Grid>
<telerik:RadSvgImage
UriSource="{Binding file}"
HorizontalAlignment="Left"
SizeType="ContentToSizeStretch"
OverrideColor="{Binding ImageColor}"
/>
</Grid>
</DataTemplate>