■ RichEditControl 클래스 : 문자 포맷 변경하기

----------------------------------------------------------------------------------------------------

using System.Drawing;

 

using DevExpress.Xpf.RichEdit;

using DevExpress.XtraRichEdit.API.Native;

 

RichEditControl richEditControl = new RichEditControl();

 

...

 

Document            document            = richEditControl.Document;

DocumentRange       documentRange       = document.Selection;

CharacterProperties characterProperties = document.BeginUpdateCharacters(documentRange);

 

characterProperties.FontName       = "Comic Sans MS";

characterProperties.FontSize       = 18;

characterProperties.ForeColor      = Color.Yellow;

characterProperties.BackColor      = Color.Blue;

characterProperties.Underline      = UnderlineType.DoubleWave;

characterProperties.UnderlineColor = Color.White;

 

document.EndUpdateCharacters(characterProperties);

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker
TAG

댓글을 달아 주세요