void richEditControl1_BeforePagePaint(object sender, DevExpress.XtraRichEdit.BeforePagePaintEventArgs e)
        {
            if (e.CanvasOwnerType == CanvasOwnerType.Printer)
            {
                return;
            }
            CustomDrawPagePainter customPagePainter = new CustomDrawPagePainter(richEditControl1);

            e.Painter = customPagePainter;
        }
        private void RichEditControl1_BeforePagePaint(object sender, DevExpress.XtraRichEdit.BeforePagePaintEventArgs e)
        {
            if (e.CanvasOwnerType == DevExpress.XtraRichEdit.API.Layout.CanvasOwnerType.Printer)
            {
                return;
            }
            DevExpress.XtraRichEdit.API.Native.CharacterStyle style = richEditControl1.Document.CharacterStyles["Line Number"];
            MyPagePainter customPagePainter = new MyPagePainter(richEditControl1, SystemColors.Info, style);

            customPagePainter.LineNumberPadding = 60;
            e.Painter = customPagePainter;
        }
Example #3
0
 void richEditControl_BeforePagePaint(object sender, DevExpress.XtraRichEdit.BeforePagePaintEventArgs e)
 {
     e.Painter = new CustomPagePainter(richEditControl);
 }