Page count in WPF Rad Document

3 posts, 0 answers
  1. Andrew
    Andrew avatar
    6 posts
    Member since:
    Feb 2015

    Posted 09 Jun 2015 Link to this post

    Is there any easy way to get the current page count from a WPF RadDocument that is set to layout Paged?
  2. Tanya
    Tanya avatar
    376 posts

    Posted 10 Jun 2015 Link to this post

    Hi Andrew,

    You could check the PageNumber property of the last SectionLayoutBox element in order to obtain the count of the pages in a RadDocument. Please, check the snippet below, which demonstrates how this could be achieved:
    SectionLayoutBox lastSectionLayoutBox = (SectionLayoutBox)this.radRichTextBox.Document.DocumentLayoutBox.ChildLayoutBoxes.Last;
    int pagesCount = lastSectionLayoutBox.PageNumber;

    Hope this helps.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
  4. Andrew
    Andrew avatar
    6 posts
    Member since:
    Feb 2015

    Posted 11 Jun 2015 in reply to Tanya Link to this post

    Thanks for the reply, it was very helpful.


    I've just found a new way of doing this though from searching for the word count.  For reference I've linked the thread below.


Back to Top