The problem is that you're trying to set properties on an Image
object that you're not using while ignoring the same settings on the ImageBrush
that you are using. The Image
in this case is just being thrown away and the ImageBrush
just happens to be using the same source image. Set the Stretch
property on the ImageBrush
instead:
BitmapImage ii = new BitmapImage(new Uri(path));
ImageBrush imageBrush = new ImageBrush(ii);
imageBrush.Stretch = Stretch.Uniform;
InkCanvas1.Background = imageBrush;