0
我在画布对象“CanvasContain”中有很多UI元素。在鼠标移动时,我想要抵消该画布中的所有UI元素。我与画布的名字尝试,这是工作的罚款:如何在鼠标移动时更改画布小孩的位置?
foreach(UIElement child in CanvasContain.Children)
{
if (child != null)
{
Canvas2.Offset -= position - LastMousePosition;
Canvas3.Offset -= position - LastMousePosition;
}
}
但是,当我尝试用child.offset
它无法正常工作。我怎样才能动态地改变偏移量?
顺便说一句,我使用ZoomableCanvas zomming和平移 – srinivas