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

Page count in WPF Rad Document

2 Answers 239 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Phoenix
Top achievements
Rank 1
Phoenix asked on 09 Jun 2015, 11:15 AM
Is there any easy way to get the current page count from a WPF RadDocument that is set to layout Paged?

2 Answers, 1 is accepted

Sort by
0
Tanya
Telerik team
answered on 10 Jun 2015, 02:26 PM
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.

Regards,
Tanya
Telerik
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
0
Phoenix
Top achievements
Rank 1
answered on 11 Jun 2015, 09:03 AM

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.

 

http://www.telerik.com/forums/word-counts-with-radrichtextbox

Tags
General Discussions
Asked by
Phoenix
Top achievements
Rank 1
Answers by
Tanya
Telerik team
Phoenix
Top achievements
Rank 1
Share this question
or