0

我正在做rotationTransform并且scaleTransform在用户控件内的椭圆中。我已经尝试过了,但没有奏效。

Point myUiElementPosition = 
   ellipse.TransformToAncestor(this.Parent as Panel).Transform(new Point(0, 0));

我正在使用鼠标旋转对象,但上面的代码总是返回相同的值!

我究竟做错了什么?我已经尝试将App.Current.MainWindow而不是this.Parent as Panel.

我也尝试使用this而不是ellipse.

帮助!

4

1 回答 1

0

使用ellipse.Parent而不是this.Parent. 我希望这将有所帮助。

于 2012-07-16T16:19:43.187 回答