0

My research on rendering 2d images led me to this... Spritesheet in Silverlight This Answer was good enough however, I do not want to use rectangle. I think using an image class to just show the image makes more sense.. After trying to understanding the above example. I came up with following code...

img = new Image();
img.Source = 500x500BigHugeImage;
img.Width = 100
img.Height = 100
img.Stretch = System.Windows.Media.Stretch.None;
img.VerticalAlignment = System.Windows.VerticalAlignment.Top;
img.HorizontalAlignment = System.Windows.HorizontalAlignment.Left;

Now the image class only shows the top left corner of the source image. I need to navigate through the huge 500x500BigHugeImae in order to move to the I can't navigate.

Community
  • 1
  • 1
Bug
  • 185
  • 1
  • 3
  • 13

1 Answers1

1

I think using an image class to just show the image makes more sense.

You are not just "showing an image", you need a specific portion of it, in that case it does make more sense to use Rectangle in combination with an ImageBrush.

H.B.
  • 166,899
  • 29
  • 327
  • 400