This is a migrated thread and some comments may be shown as answers.

RadBook Zoom In/Out and Panning by Touch

2 Answers 75 Views
Book
This is a migrated thread and some comments may be shown as answers.
Mandeep
Top achievements
Rank 1
Mandeep asked on 04 Aug 2012, 10:35 AM
Hi Team,

I have purchased the telerik licences  recently. I am using  RadBooK control for showing PDF file as needed the functionality  to change the pages horizontally(Swipe functionality).
But my requirement is also to have Zoom in/out and Panning feature by touch(and multi-touch also).

Please guide me for achieving this functionality. It will be great if you can also provide Code snippets or relevant links.

Thanks,
Mandeep Kaur. 

2 Answers, 1 is accepted

Sort by
0
Tina Stancheva
Telerik team
answered on 08 Aug 2012, 02:20 PM
Hi,

The standalone RadPdfViewer control supports both zoom and pan. However in order to display a PDF file in the RadBook control, you need to use a FixedDocumentSinglePagePresenter for each page and it doesn't support zoom and pan.

Also, as the RadBook control is essentially an ItemsControl and you can wrap pretty much anything in its RadBookItem, we can't implement a common out-of-the-box zoom or pan functionality for the pages. However, you can try to use a ScaleTransform to create a custom zoom in functionality like so:
this.book.RenderTransform = newScaleTransform()
 {
     ScaleX = scaleFactor,
     ScaleY = scaleFactor,
     CenterX = centerX,
     CenterY = centerY
 };


Kind regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Darryn
Top achievements
Rank 1
answered on 13 Sep 2012, 04:52 PM
*Edit just had to adjust width height of grid properly and size of page to half width of grid... silly error from my side
Tags
Book
Asked by
Mandeep
Top achievements
Rank 1
Answers by
Tina Stancheva
Telerik team
Darryn
Top achievements
Rank 1
Share this question
or