This is a migrated thread and some comments may be shown as answers.

RadRichTextBox read-only mode not displaying content correctly

1 Answer 101 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Leon
Top achievements
Rank 1
Leon asked on 17 Jan 2013, 05:11 PM
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>

1 Answer, 1 is accepted

Sort by
0
Petya
Telerik team
answered on 21 Jan 2013, 04:57 PM
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.

Tags
RichTextBox
Asked by
Leon
Top achievements
Rank 1
Answers by
Petya
Telerik team
Share this question
or