RichTextBox: Inserting an inline image goes partially on top of the previous line

3 posts, 1 answers
  1. Tinja
    Tinja avatar
    2 posts
    Member since:
    Oct 2015

    Posted 08 Feb Link to this post

    Hi!

    I'm trying to add an inline image to a RadRichTextBox by dragging and dropping the image from elsewhere in my application. I noticed that sometimes the image goes partially on top of the previous line as shown in the attached picture. Even when changing the wrapping style between square and top-and-bottom, it doesn't get fixed. 

    I wonder what's causing this? Is there a way to work around this? Could it be just my Visual Studio?

    Thanks!

    Tinja

     

  2. Answer
    Boby
    Admin
    Boby avatar
    595 posts

    Posted 10 Feb Link to this post

    Hello Tinja,

    I have answered this question in the support ticket you opened due to the more specific information provided there. Basically the problem was that an ImageInline instance was constructed with empty size (Size()) instead of with the correct dimensions.

    Regards,
    Boby
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. UI for WPF is Visual Studio 2017 Ready
  4. Tinja
    Tinja avatar
    2 posts
    Member since:
    Oct 2015

    Posted 11 Feb Link to this post

    Hi!

    To leave the result for other people who might face this problem, I'm going to reply to this thread. 

    The issue was in pasted text, where the line spacing type was "Exact".

    To solve this I created an event handler to handle the PasteCommand where I iterate through all the paragraphs and set the line spacing type to "Auto" and line spacing to 1.5.

    Huge thanks to Boby for identifying the problem and helping with this issue!

     

    Tinja

Back to Top