Thank you for writing back.
As it was already noted in my previous post, there is not a specific event that is fired when the content jumps to a new page.
uses different commands for manipulating the document. Hence, the CommandExecuting
event is fired for different types of commands. It is up to you which commands to cancel when pages number is increased. However, some of the insert commands, e.g. InsertPictureCommand
, are triggered before the image is actually inserted in the document.
An alternative solution that I can suggest is to subscribe to the CommandExecuted
event and make undo of the last insert operation that exceeds the pages limit:
sender, CommandExecutedEventArgs e)
.radRichTextEditor1.Document.FirstLayoutBox.ChildLayoutBoxes.Count > 1)
"The document must be one page."
I hope this information helps. If you have any additional questions, please let me know.
Telerik by Progress
Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post
and share your thoughts.