RadRichTextBox read-only mode not displaying content correctly

2 posts, 0 answers
  1. Leon
    Leon avatar
    10 posts
    Member since:
    Aug 2012

    Posted 17 Jan 2013 Link to this post

    I am attempting to use the RadRichTextBox control in read-only mode to display the content of a file (either a MS Word document or HTML).  When the documens are displayed in the RadRichTextBox, the content is double-spaced, even though the source documents are single-spaced.
    This is the content of my silverlight user control.  I have code in the code-behind page that sets the Document property with either an HTML or MS-Word document.
    <UserControl
      x:Class="NCS.IS.ActionItemsUserControls.RichTextDisplay"
      mc:Ignorable="d"
      d:DesignHeight="500" d:DesignWidth="1000">
      
      <Grid x:Name="LayoutRoot" Background="White">
        <telerik:RadRichTextBox x:Name="radRichTextBox" 
                       HorizontalAlignment="Left" 
                       VerticalAlignment="Top"
                       IsSelectionMiniToolBarEnabled="False" 
                       IsReadOnly="True" 
                       IsEnabled="True"
                       IsSpellCheckingEnabled="False" 
                       IsContextMenuEnabled="False"
                       HyperlinkNavigationMode="Click"
                       Margin="0,0,0,0" 
                       BorderThickness="0,0,0,0" 
                       LayoutMode="Paged" 
                       FontFamily="Arial"   />
      </Grid>
    </UserControl>
  2. Petya
    Admin
    Petya avatar
    975 posts

    Posted 21 Jan 2013 Link to this post

    Hello Leon,

    When you say the text is double-spaced, are you referring to the line-spacing property of the paragraphs? If this is the case, we have not encountered such issue before and the XAML you pasted does not seem to be the one to blame. That said, may I kindly ask you to open a support ticket and attach one of the files you are importing, so we can further investigate the problem?

    On a side note, I can see that you've set the FontFamily property of the editor. However, in order to set default font settings to a RadRichTextBox, you should also set the DocumentInheritsDefaultStyleSettings property to true as explained here.

    I'm looking forward to hearing from you.
     
    Greetings,
    Petya
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. DevCraft banner
Back to Top