|
|
Thank you, it works perfectly !!!!!
|
|
|
If I understood you correctly, you should change pdfViewer1.Padding property
|
|
|
Hello Paul,
I've tried that:
PageHAlign : Center PageVAlign: Top VerticalAlignement: Stretch Vertical contentAlignement : Top
And then i tried with this code:
private void pdfViewerMouseWheel(object sender, MouseWheelEventArgs e) { if (e.Delta < 0 || e.Delta > 0) { // Get the x and y coordinates of the mouse pointer. System.Windows.Point position = e.GetPosition(this); double pY = position.Y; double pX = position.X;
// Sets the Height/Width of the circle to the mouse coordinates. pdfViewer.Height = pY; pdfViewer.Width = pX;
} }
The problem is that all the pdfViewer move and i would like that only the open PDF follows the mouse cursor... Can you help me?
Thanks
|
|
|
The pages in the viewer are aligned according to the PageAlign property. In your case, you have PageAlign = MiddleCenter.
There is only one way to influence to page position. If you know the displayed size of the page and the client size of the viewer, then you can calculate the page offset from its normal position. Accordingly, you can set the padding value of the viewer and thus move the page to the desired position vertically. Summarizing: 1. set pdfViewer.PageAlign to ContentAlignment.TopCenter 2. Calculate page offset from the top border of the viewer 3. set pdfViewer.Padding.Top to calculated value.
|
|
|
Hello everyone,
With your help, and more specifically, Paul Rayman's help (thanks again), I have been able to put a nice mouse wheel zoom on my application. I'm now facing a new zoom problem. When I zoom out on my PDF, there is no problem, but when i zoom in, the zoom isn't very precise at the beginning because the PDF page is vertically centered when the vertical scrollbar is visible.
I would like that the PDF stay focus on where the mouse cursor is (vertically). I would like to end up with a floating margin top and bottom.
Can someone tell me where (or how) the PDF position is managed.
Thank you very much !
|
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