How could I make the content which is put inside WPF Viewbox
with Stretch="UniformToFill"
be scrollable?
For example:
<Grid Height="500" Width="1000" >
<ScrollViewer VerticalScrollBarVisibility="Visible" HorizontalScrollBarVisibility="Visible" >
<Viewbox Stretch="UniformToFill">
......
</Viewbox>
</ScrollViewer>
</Grid>
The content is resized to fill the destination dimensions while it preserves its native aspect ratio. If the aspect ratio of the destination differs from the source, the source content is clipped to fit in the destination dimensions.
So I tried to use ScrollViewer
to be able to scroll to the areas of the source content which were clipped, but the Scrollbars are visible but disabled.
I tried ClipToBounds="False"
but it didn't help.