0
votes

I have the following XAML :

<ScrollViewer HorizontalAlignment="Left" Margin="3,226,0,0" Name="Scv" VerticalAlignment="Top" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" >

<Canvas Height="100" Name="canvas1" Width="292" >
Image Canvas.Left="0" Canvas.Top="0" Height="440" Name="image1" Stretch="Fill" Width="730" / >
<InkPresenter Name="inkPresenter1"></InkPresenter>
</Canvas>
</ScrollViewer>

The problem : How do I stop the ScrollViewer from scrolling AFTER i have scrolled the image to the point I wanted.

In the Above example, I use scrollViewer to scroll the image to a section where I want to stop so that I can use InkPresenter to draw. But Whenever I draw Up or down, the scrollviewer follows the action of InkPresenter Up and down movement.

Thanks

1

1 Answers

2
votes

Check this discussion: How to block scrolling in ScrollViewer

Another option could be to dynamically set the SetVerticalScrollBarVisibility do Disabled:

ScrollViewer.SetVerticalScrollBarVisibility(scrollViewer, ScrollBarVisibility.Disabled);