At the moment, to get the coordinates of the mouse, I use the following approach:
XAML
<interactivity:Interaction.Triggers> <interactivity:EventTrigger EventName="PreviewDragOver"> <i:CallMethodAction MethodName="UIElement_OnPreviewDragOver" TargetObject="{Binding}" /> </interactivity:EventTrigger> </interactivity:Interaction.Triggers> VM
public void UIElement_OnPreviewDragOver(object sender, DragEventArgs e) { Point = e.GetPosition((TreeView)sender); } I’m not satisfied with the fact that I’m working inside a VM with a control, and I would like to redo this handler on ICommand . But how then to get the coordinates of the mouse?
WinApi. - LightnessTriggerAction<ICommand>- Pavel MayorovTriggerAction<ICommand>- Lightness