How to detect current page at caret

3 posts, 0 answers
  1. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 09 Nov 2013 Link to this post

    Hi,

    What's the best method to determine the current page number at the caret position or even a specified position?

    I'm using library version 2013.1.220.40.

    Thanks,

    Rob
  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 11 Nov 2013 Link to this post

    Hello Rob,

    You can obtain the page number based on a DocumentPosition as follows:
    SectionLayoutBox sectionBox = position.GetCurrentSectionBox();
    int pageNumber = sectionBox.PageNumber;

    Let me know if you have additional questions or comments.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Robert
    Robert avatar
    271 posts
    Member since:
    Mar 2011

    Posted 12 Nov 2013 Link to this post

    Thanks Petya,

    I will give this a try sometime next week.

    Many thanks for your help,

    Rob
Back to Top