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.
GridWPF内のすべての要素を反復処理してから、これらすべての絶対位置値(X、Y)にアクセスする方法を知りたいUIElementsです。
Grid
UIElements
foreach (UIElement child in grid.Children) { MatrixTransform t = (MatrixTransform)child.TransformToAncestor(grid); Point childLocation = new Point(t.Value.OffsetX, t.Value.OffsetY); }
に関連するすべての直接の子の座標を提供しますGrid。