Declined
Last Updated: 26 Apr 2016 10:02 by ADMIN
ADMIN
Dimitar
Created on: 27 Apr 2015 07:45
Category: RichTextEditor
Type: Bug Report
0
FIX. RadRichTextEditor - the layout is not updated after images and spans are added in code behind.
To reproduce:
Add image like this:
void button_Click1(object sender, EventArgs e)
{
    Section section = new Section();
    Paragraph paragraph = new Paragraph();
    ImageInline image;
    Telerik.WinControls.RichTextEditor.UI.Size size = new Telerik.WinControls.RichTextEditor.UI.Size(236, 50);
    using (MemoryStream ms = new MemoryStream())
    {
        System.Drawing.Image.FromFile(@"C:\img\delete.png").Save(ms, System.Drawing.Imaging.ImageFormat.Png);
        image = new ImageInline(ms, size, "png");
    }

    paragraph.Inlines.Add(image);
    section.Children.Add(paragraph);
    this.radRichTextEditor1.Document.Sections.Add(section);
}

Workaround:
Manually update the layout:
 this.radRichTextEditor1.UpdateEditorLayout();
1 comment
ADMIN
Stefan
Posted on: 26 Apr 2016 10:01
Deleted as duplicate: http://feedback.telerik.com/Project/154/Feedback/Details/188589