0
<Image x:Name="pageImg" Margin="24,-1,37,19" Source="img\verses\67_ (11).png" Stretch="Uniform"  />

How to set for example 95 percent of an image be displayed?

Vlad
  • 115
  • 7

1 Answers1

3

What you are looking for is a cropped bitmap:

<Image>
  <Image.Source>
    <CroppedBitmap Source="<path to source image>" SourceRect="10,10,10,10"/>
  </Image.Source>
</Image>

The parameters in SourceRect determine the starting point and the area that is being viewed.

Source:

https://msdn.microsoft.com/en-Us/library/system.windows.media.imaging.croppedbitmap(v=vs.110).aspx

Fang
  • 2,199
  • 4
  • 23
  • 44
  • Apologies for the answer to a duplicate. I wasn't aware of http://stackoverflow.com/questions/2200604/in-wpf-view-a-portion-of-an-image – Fang Jul 22 '16 at 11:51