문제

I have plotted controls on ViewPort at specified locations. And the ViewPort is placed on Canvas. On click on the plotted control, I want to get the coordinate point with reference to the ViewPort container(Canvas). I get the point coordinate where the control placed on ViewPot, but I want it with reference to the container.

Please suggest your ideas for converting the ViewPort Point to normal screen point.

Thanks in advance.

도움이 되었습니까?

해결책

At last I got:

var currentPosition = Mouse.GetPosition(container);

This will return current click point with reference to ViewPort.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top