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

Create an instance of RichTextBox

3 Answers 182 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Sandeep
Top achievements
Rank 1
Sandeep asked on 29 Mar 2011, 07:28 PM
Hi, 

I have a license version of Telerik controls (2010.3.1110.35).
I want to use RichText box which is part of Telerik latest version.
I have downloaded the version and trying to create an instance of it.
But i dont see RichTextBox available in the dlls.
Please let me know how to create an instance along with the databinding sample.

Thanks

3 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 31 Mar 2011, 09:44 AM
Hello Sandeep,

RadRichTextBox is included in Telerik.Windows.Documents assembly and you have to add a reference to that assembly in order to use the control.
You can review the documentation of the Silverlight version, since you can use both versions of the control in one and the same way. More information on data-binding can be found here. The only difference is that the data providers have to be in the visual tree and not in the resources in order to work. They have no visual representation, so the layout of the page will not be affected.
If you have other questions, do not hesitate to contact us again.

Best wishes,
Iva
the Telerik team
0
Sandeep
Top achievements
Rank 1
answered on 04 Apr 2011, 06:29 PM
Thanks for the reply.

I would like to bind RTF format to the RadRichTextBox Control..
Here is how the RTF content will be : {\rtf1\ansi\ansicpg1252\uc1\htmautsp\deff2{\fonttbl{\f0\fcharset0 Times New Roman;}{\f2\fcharset0 Tahoma;}}{\colortbl\red0\green0\blue0;\red255\green255\blue255;\red128\green100\blue162;\red255\green255\blue0;}\loch\hich\dbch\pard\plain\ltrpar\itap0{\lang1033\fs16\f2\cf0 \cf0\ql{\f2 {\b\cf2\highlight3\ltrch testing dffgf}\li0\ri0\sa0\sb0\fi0\ql\par}  }  }



Could you please tell me how to bind the RTF text to the control.
I have licensed version of Telerik controls, Could you please respond soon as its pretty urgent.

Thanks in advance.
0
Iva Toteva
Telerik team
answered on 07 Apr 2011, 12:34 PM
Hello Sandeep,

Actually you don't seem to be associated with any license. You should contact the license owner or our Sales team in order to set things straight and to be able to take advantage of the priority support.
As for your question, here is how you can bind the document of a rich text box:

xmlns:telerikRTF="clr-namespace:Telerik.Windows.Documents.FormatProviders.Rtf;assembly=Telerik.Windows.Documents.FormatProviders.Rtf"
 
<telerikRTF:RtfDataProvider Rtf="{Binding RtfText}" RichTextBox="{Binding ElementName=rrtb}" />
<telerik:RadRichTextBox Grid.Row="1" Name="rrtb" />

This will work if you have set the data context to an object that has a string property RtfText containing the RTF string.

Best wishes,
Iva
the Telerik team
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 Public Issue Tracking system and vote to affect the priority of the items
Tags
RichTextBox
Asked by
Sandeep
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Sandeep
Top achievements
Rank 1
Share this question
or