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.
我在 Canvas 中有一张图片;当缩放我的图像时,它的 left 和 top 属性不会改变,但缩放图像的左侧实际上是一些其他值,我只能通过手动计算获得有没有办法更新我的图像 Cavas.Left?
尝试这个:
Canvas.SetLeft(yourImage, *newValue*);
或这个:
yourImage.SetValue(Canvas.LeftProperty, *newValue*);
您需要使用 Grid 控件而不是 Canvas。