Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有Shape(Path或Polyline)。我想在某个向量上移动我的形状。我需要用一种简单的方法,如下所示:
Shape
Path
Polyline
Move(shape, 0, 5);
我怎么能做到这一点?课堂上有这样的方法Shape吗?
您正在寻找TranslateTransform课程。
TranslateTransform
您可以将RenderTransform属性与TranslateTransform类一起使用:
shape.RenderTransform = new TranslateTransform(0, 5);