RadBook Zoom In/Out and Panning by Touch

3 posts, 0 answers
  1. Mandeep
    Mandeep avatar
    7 posts
    Member since:
    Aug 2012

    Posted 04 Aug 2012 Link to this post

    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. Tina Stancheva
    Admin
    Tina Stancheva avatar
    3298 posts

    Posted 08 Aug 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Darryn
    Darryn avatar
    1 posts
    Member since:
    Sep 2012

    Posted 13 Sep 2012 Link to this post

    *Edit just had to adjust width height of grid properly and size of page to half width of grid... silly error from my side
Back to Top