|
|
This worked perfectly. Thank you for your help!
|
|
|
XAML: Code:
<ScrollViewer Grid.Row="1" CanContentScroll="True" VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto">
<Wpf:PdfViewer Name="pdfViewer1" ViewMode="SinglePage" SizeMode="FitToSize" MouseWheel="pdfViewer1_MouseWheel" />
</ScrollViewer>
code behind: Code:
private void pdfViewer1_MouseWheel(object sender, MouseWheelEventArgs e)
{
var doc = pdfViewer1.Document;
if (doc == null)
return;
if (e.Delta < 0 && pdfViewer1.CurrentIndex < doc.Pages.Count)
pdfViewer1.CurrentIndex++;
else if (e.Delta > 0 && pdfViewer1.CurrentIndex > 0)
pdfViewer1.CurrentIndex--;
}
|
|
|
I am trying to figure out how to only display a single page at a time and when the user scrolls using a mouse, it scrolls through full page views (Not showing partials as you scroll up).
I was advised to do this in an email "You can call ScrollToPage method or increment/decrement CurrentPageIndex property". Is there any documentation on how to actually implement that and use it for C# WPF applications.
|
Important Information:
The Patagames Software Support Forum uses cookies. By continuing to browse this site, you are agreeing to our use of cookies.
More Details
Close