开发者

ScaleTransform and Image size

开发者 https://www.devze.com 2022-12-26 19:57 出处:网络
I have a Canvas which has an image as background. When I do the ScaleT开发者_开发百科ransform to increase the size of the image, the image blows out of the Canvas. Although I increase the size, I don\

I have a Canvas which has an image as background. When I do the ScaleT开发者_开发百科ransform to increase the size of the image, the image blows out of the Canvas. Although I increase the size, I don't want the image to go out of the Canvas, I just want it to fit inside the Canvas. How to fix this issue in WPF?


Set ClipToBounds=True on the Canvas

0

精彩评论

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

关注公众号