How to auto-fit RadRichTextEditor
Environment
Product Version | Product | Author |
---|---|---|
2018.3.1016 | RadRichTextEditor for WinForms | Desislava Yordanova |
Description
This article aims to demonstrate a sample approach how to auto-fit the document in RadRichTextEditor so that the editor shows always the whole page.
Solution
It can be achieved by adjusting the scale factor programmatically in order to fit the page. Thus, by calculating a ratio between the size of the editor and the actual page size, you can use this ratio to set the ScaleFactor property:
Auto-Fit RadRichTextEditor
Now, you can resize the form and the document will fit the width: