Limit DevExpress RichEditControl to a single page
RichEditControl in DXperience WinForms has a view named 'Pr开发者_StackOverflowintLayoutView'. This view displays documents as pageable, rather than infinite. I'd like to limit the control to show only first page of the document and control page navigation programmatically.
Is this accomplishable?
The XtraRichEdit does not provide an elegant way to implement this task. The only solution is to turn off all scrollbars (RichEditControl.Options.HorizontalScrollbar.Visibility and RichEditControl.Options.VerticalScrollbar.Visibility) and finally create commands to programmatically change the current Page, you should execute the RichEdit's NextPageCommand. To learn about commands, please refer to the Commands topic.
Update
GoToPageCommand goToPageCommand = new GoToPageCommand(richEditControl1);
ICommandUIState state = goToPageCommand.CreateDefaultCommandUIState();
state.EditValue = 10;
goToPageCommand.ForceExecute(state);
精彩评论