简体   繁体   中英

Translations WPF

I have a Path within a Grid, this Path has a left margin which will move beyond the edges of the grid. For example the grid has size 600x600 and the path is a rectangle with size 200x200. The rectangle is positioned with a left margin of 500, then is half in and for the other half outside. In this case is properly displayed only the left half (the one inside the grid).

But now I decide to make a transformation of translation (TranslateTransform) of the rectangle to the left for a value of 300. So I expect that the rectangle is displayed with a left margin of 200, what actually happens, however, the problem is that it always displays the left half of the rectangle, as if the left part had been designed before the translation.

How can I change this behavior? Thank you.

尝试使用画布而不是网格。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM