开发者

Position Labels on top of Image

I used a image in WPF. On top of the image开发者_运维技巧 I positioned labels. When resizing my window the image also resizes, which is ok. However the labels should also reposition. So they keep on the same relative position on top of the image. Currently I'm using a canvas. I set the Canvas.Top and Canvas.Left properties for the labels. How can I fix the positioning of the labels when resizing.


Use a Viewbox and place your Canvas inside the ViewBox.


If you want put the label always on top of the image, simply use StackPanel.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜