20 Answers, 1 is accepted
We do not provide API for customizing the look of the caret.
Thank you for pointing out this use-case, where the caret must not be black. We will make sure to change that behavior in the future.
Iva
the Telerik team
Any update on this one?
I would like to change the caret colour.
Thanks T.
You can add the following Style to RadRichTextBox resources in order to change the caret color:
<
telerik:RadRichTextBox.Resources
>
<
Style
TargetType
=
"telerikUI:Caret"
>
<
Setter
Property
=
"CaretBrush"
Value
=
"White"
/>
</
Style
>
</
telerik:RadRichTextBox.Resources
>
Let us know if this worked for you.
Kind regards,
Mike
the Telerik team
Strangely it works 50% of the time.
I have the richtextbox in tha childwindow, on popup/show the cursor flashes white but then loses focus to another control. On return to focus it sometimes keeps it's white color or reverts back to black.
What can I do about this?
Thanks.
We were not able to reproduce the issue. Could you please open a support ticket and send a sample application that illustrates the problem and some steps (if necessary) that would lead to the behavior you describe?
All the best,Iva
the Telerik team
I'm really stuggling to recreate this in a test app! typical.
Any ideas as where to start with this....any holes that you could think are causing this problem?
The Caret actually inherits from TextBox, so at first place you should check if you set any implicit styles to text boxes in your application.
How do you set the style of the caret - implicit or explicit? Do you perform any additional manipulations to the focus - for example calls to Focus method of some of the controls?
Boby
the Telerik team
I'm setting like like below within a custom theme.
I have this within a childwindow and on the open event I call focus on another control, I did remove this as I noticed that the RadRichTextBox seems to open with focus and then it flicks to this other control but then on return to the RadRichTextBox it sometimes doesn't keep it's white CaretBrush. Even after removal it still occurred so I didn't explore this much further.
Any help is really appreciated.
<Style TargetType="telerikUI:Caret">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="telerikUI:Caret" >
<Grid x:Name="RootElement" >
<ScrollViewer
x:Name="ContentElement"
BorderThickness="0" Padding="0" />
<Rectangle x:Name="Rectangle" />
</Grid>
</ControlTemplate>
</Setter.Value>
</Setter>
<Setter Property="HorizontalAlignment" Value="Left" />
<Setter Property="VerticalAlignment" Value="Top" />
<Setter Property="AcceptsReturn" Value="True" />
<Setter Property="CaretBrush" Value="White"/>
<Setter Property="Padding" Value="0" />
<Setter Property="Foreground" Value="Transparent" />
</Style>
We managed to reproduce the issue and it looks like this is a problem in the ChildWindow, as Microsoft's TextBox has similar behavior. I'm attaching a simple demo that illustrates the case - on second or third showing of the ChildWindow both TextBox and RadRichTextBox carets
As a workaround you could add the Caret style directly in the RadRichTextBox resources (or anywhere in the ChildWindow):
<
telerik:RadRichTextBox
Name
=
"radRichTextBox"
Background
=
"Black"
>
<
telerik:RadRichTextBox.Resources
>
<
Style
TargetType
=
"telerikUI:Caret"
>
<
Setter
Property
=
"CaretBrush"
Value
=
"White"
/>
</
Style
>
</
telerik:RadRichTextBox.Resources
>
</
telerik:RadRichTextBox
>
Don't hesitate to contact us if you have other questions.
Boby
the Telerik team
Thanks for looking into this but I'm still loosing the color, even with the fix below.
Any other suggestions?
Thanks Toby.
It would be really hard to continue investigating the issue without a way to reproduce it; so the best thing you can do is to isolate the problem and send us a sample application (attaching it in a support ticket) that can reproduce it. The very first thing I would check would be if the ChildWindow is involved – try to remove it and see if the problem persists.
Kind regards,
Boby
the Telerik team

I am using RadRichTextBox and there is a problem that Focus not set in text area and cursor is not blinking. However I write text in text area the cursor should be blinking, But anyhow its not working. Any idea that you could think this type of behavior?
Regards
Prakash Gupta
Web Designer
INDIA
Thanks for your question!
To be able to understand properly what the problem might be, we will need to have a small demo application demonstrating it. Please open a support ticket and send us an example application which isolate the problem.
Best wishes,
Vesko
the Telerik team

I am using RadRichTextBox control, I have added telerik.windows.controls.input dll to the reference of this control. but I am facing below exception error.
anyone have any idea?
Exception Message : Object reference not set to an instance of an object.
Stack Trace : at Telerik.Windows.Documents.DocumentPositionLocationHelper.GetLineY(InlineLayoutBox box)
at Telerik.Windows.Documents.DocumentPositionLocationHelper.GetCenter(InlineLayoutBox layoutBox)
at Telerik.Windows.Documents.DocumentPositionLocationHelper.IsBetterSolution(InlineLayoutBox currentSolution, InlineLayoutBox candidateSolution, PointF position)
at Telerik.Windows.Documents.DocumentPositionLocationHelper.GetNearestLeafBoxByPosition(PointF position, LayoutBox root, LayoutBox& currentSolution)
at Telerik.Windows.Documents.DocumentPositionLocationHelper.GetLayoutBoxByPosition(PointF position, LayoutBox root)
at Telerik.Windows.Documents.DocumentPosition.SetPosition(PointF position, Boolean MoveToNextIfOutOfBox)
at Telerik.Windows.Documents.Selection.MouseSelectionHandler.SetDocumentPosition(DocumentPosition documentPosition, Point position, Boolean moveToNextIfOutOfBox)
at Telerik.Windows.Documents.Selection.MouseSelectionHandler.RegisterDocumentSingleMouseDown(Boolean ctrlPressed, Boolean shiftPressed, Point position)
at Telerik.Windows.Documents.Selection.MouseSelectionHandler.RegisterDocumentMouseDown(Boolean ctrlPressed, Boolean shiftPressed, Point position)
at Telerik.Windows.Documents.UI.DocumentPresenterBase.Owner_MouseLeftButtonDown(Object sender, MouseButtonEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
Thanks,
- Parth Gandhi
Samyak Infotech Pvt. Ltd.
Ahmedabad
The stack trace is below:
at Telerik.Windows.Documents.DocumentPositionLocationHelper.GetLineY(InlineLayoutBox box)
at Telerik.Windows.Documents.DocumentPositionLocationHelper.GetCenter(InlineLayoutBox layoutBox)
at Telerik.Windows.Documents.DocumentPositionLocationHelper.IsBetterSolution(InlineLayoutBox currentSolution, InlineLayoutBox candidateSolution, PointF position)
at Telerik.Windows.Documents.DocumentPositionLocationHelper.GetNearestLeafBoxByPosition(PointF position, LayoutBox root, LayoutBox& currentSolution)
at Telerik.Windows.Documents.DocumentPositionLocationHelper.GetNearestLeafBoxByPosition(PointF position, LayoutBox root, LayoutBox& currentSolution)
at Telerik.Windows.Documents.DocumentPositionLocationHelper.GetLayoutBoxByPosition(PointF position, LayoutBox root)
at Telerik.Windows.Documents.DocumentPosition.SetPosition(PointF position, Boolean MoveToNextIfOutOfBox)
at Telerik.Windows.Documents.UI.DocumentWebLayoutPresenter.GetDocumentPositionFromViewPoint(Point viewPoint)
at Telerik.Windows.Documents.UI.DocumentPresenterBase.Owner_MouseRightButtonUp(Object sender, MouseButtonEventArgs e)
at MS.Internal.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, Int32 actualArgsTypeIndex, String eventName)
HELP!
We are sorry for the inconvenience. Could you please give us more details about the way to reproduce the exception - for example some steps to follow or sample project (document)?
Looking forward to your reply.
Kind regards,
Boby
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
I'll post if I discover what it is.

I see similar issue with the example you provided.
Even when user types, the foreground of text is black. Is there any way we can set foreground to white as whatever user enters.
Is there any workaround to this problem. How can we get this functionality. Please help me. It's really very important to us.
Thanks
Rakesh
We are still not able to reproduce the issue with the care you have reported. If you like, you can open a support ticket and send us a sample project which contains the problem.
As for your other question, in order to set the RadRichTextBox text color to white by default, you can use this line of code which sets the default color for the current document instance:
((RadRichTextBox)sender).Document.StyleRepository[
"Normal"
].SpanProperties.ForeColor = Colors.White;
You can execute it on RadRichTextBox_Loaded and on RadRichTextBox_DocumentChanged, as the StyleRepository is a property of the document.
Hope this helps.
Kind regards,
Todor
the Telerik team
Time to cast your vote for Telerik! Tell DevPro Connections and Windows IT Pro why Telerik is your choice. Telerik is nominated in a total of 25 categories.

[code]<telerik:RadRichTextBox CaretColor="White">[/code]