积极答复者
如何在WPF中缩放图形?

问题
-
答案
-
你要想对每个图像都缩放,那你直接缩放Canvas就好了啊
<Canvas Canvas.Left="53" Canvas.Top="60" Height="110" Width="240">
<Canvas.LayoutTransform>
<ScaleTransform ScaleX="2" ScaleY="2" CenterX=".5" CenterY=".5" />
</Canvas.LayoutTransform>
</Canvas>
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已建议为答案 Jie BaoModerator 2011年4月13日 3:06
- 已标记为答案 qzr_1986 2011年4月13日 5:13
-
或者, 用缩放控件:
- ZoomableCanvas: http://blogs.msdn.com/b/kaelr/archive/2010/07/29/zoomablecanvas.aspx
- 介绍: http://blogs.msdn.com/b/wpf/archive/2010/08/12/wpf-zoomablecanvas-with-a-million-items-from-kael-rowan.aspx
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已建议为答案 Jie BaoModerator 2011年4月13日 3:06
- 已标记为答案 qzr_1986 2011年4月13日 5:13
全部回复
-
你要想对每个图像都缩放,那你直接缩放Canvas就好了啊
<Canvas Canvas.Left="53" Canvas.Top="60" Height="110" Width="240">
<Canvas.LayoutTransform>
<ScaleTransform ScaleX="2" ScaleY="2" CenterX=".5" CenterY=".5" />
</Canvas.LayoutTransform>
</Canvas>
Sheldon _Xiao[MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已建议为答案 Jie BaoModerator 2011年4月13日 3:06
- 已标记为答案 qzr_1986 2011年4月13日 5:13
-
或者, 用缩放控件:
- ZoomableCanvas: http://blogs.msdn.com/b/kaelr/archive/2010/07/29/zoomablecanvas.aspx
- 介绍: http://blogs.msdn.com/b/wpf/archive/2010/08/12/wpf-zoomablecanvas-with-a-million-items-from-kael-rowan.aspx
Bob Bao [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- 已建议为答案 Jie BaoModerator 2011年4月13日 3:06
- 已标记为答案 qzr_1986 2011年4月13日 5:13