I have a window with an image inside it. This is great since the Viewbox scales the image to fit the window. However, I need to be able to scale the image to its full size and show the scroll bars, and it's hard for me to figure out how to do this.
Here is what I have right now. Can someone give some guidance on how I can change this to implement the above functions?
<Viewbox x:Name="viewbox">
<StackPanel>
<Image x:Name="image" Source="ranch.jpg" />
</StackPanel>
</Viewbox>
Edit: Just for clarification. I need both ways to view the image, the style of the viewport to set the window AND the ability to switch to the actual size view, which shows the scroll bars and does not resize the image.
source
share