你好,
你可以使用MouseLeftButtonUp事件来判断图片是否拖拽完成。
并且使用MouseDragElementBehavior来实现拖拽功能。在MouseLeftButtonUp事件中通过MouseDragElementBehavior的X和Y属性来得到当前图片的位置。
xaml
<Rectangle MouseLeftButtonUp="rectangle1_MouseLeftButtonUp" >
<i:Interaction.Behaviors>
<el:MouseDragElementBehavior x:Name="behavior"/>
</i:Interaction.Behaviors>
</Rectangle>
cs
private void rectangle1_MouseLeftButtonUp(object sender, MouseButtonEventArgs e)
{
var a = behavior.X;
var b = behavior.Y;
}