views:

35

answers:

1

I have a Canvas which has an image as background. When I do the ScaleTransform 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?

+1  A: 

Set ClipToBounds=True on the Canvas

Foovanadil
It worked, thanks a lot.
Vin