Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

How to implement the basic idea of the Microsoft Word "Format Painter" feature for RichEditControl

$
0
0

This example demonstrates how to copy the characters and paragraphs properties and apply formatting to the selected text. Try the Format Painter button on the ribbon Home tab.


To obtain the selected text range, the RichEditDocument.Document.Selection property is used. The characters and paragraphs properties are obtained in the BarCheckItem.CheckedChanged event handler. Then, they are stored in the CharacterPropertiesObject and ParagraphPropertiesObject object containers.


In order to change the current RichEditControl cursor, a MouseCursorCalculator descendant is implemented. Check the custom MouseCursorCalculator class Calculate method for clarification.


Viewing all articles
Browse latest Browse all 7205

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>