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

Caret doesn't show upon start when RichTextBox is empty

1 Answer 81 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Bob asked on 18 Jan 2012, 06:05 PM
When the RichTextBox is empty upon start, the caret does not show when I click on the control.  However, when I type into the richtextbox, the text shows and the caret appears as well.  I tried setting the caretposition of the document in the constructor, but that doesn't work.  How do I make the caret show upon start?  

Below is the xaml of the usercontrol.

<UserControl x:Class="CommonControl.HtmlEditor"
    xmlns:telerikHtml="clr-namespace:Telerik.Windows.Documents.FormatProviders.Html;assembly=Telerik.Windows.Documents.FormatProviders.Html"
    xmlns:telerikHtmlMain="clr-namespace:Telerik.Windows.Documents.FormatProviders.Html;assembly=Telerik.Windows.Documents"
    mc:Ignorable="d">
 
    <telerik:RadRichTextBox HorizontalAlignment="Stretch" LayoutMode="Flow" x:Name="editor" AllowDrop="True" Drop="editor_Drop" ShowComments="False"
                            BorderBrush="Transparent" BorderThickness="0" MinWidth="536" IsSelectionMiniToolBarEnabled="False"
                            IsContextMenuEnabled="True" IsInHeaderFooterEditMode="False" DocumentPresentationChanged="EditorDocumentContentChanged"
                            MaxWidth="1024">
    </telerik:RadRichTextBox>
</UserControl>

1 Answer, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 20 Jan 2012, 05:38 PM
Hi Bob,

This is a known issue for previous versions of RRTB. It has been fixed in 2011 Q3 SP1, so if you download this version of the Silverlight controls (2011.3.1220), the problem must be resolved.
However, if you want to maintain your version, there is walkaround by setting:

DocumentInheritsDefaultStyleSettings="True"

to the rich text box. In this way the value of the FontFamily and FontSize properties of RadRichTextBox will be applied. More information on this property can be found here.

Kind regards,
Martin
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
RichTextBox
Asked by
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Answers by
Martin Ivanov
Telerik team
Share this question
or