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

Rich Text Box formatting

6 Answers 82 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
vikas
Top achievements
Rank 1
vikas asked on 28 Jul 2014, 08:08 AM
Hi Team,
I am using RichTextBox in my project. All they keyboard controls work fine. But I want to give a toggle button for bold, italics and underline, so that the user can click on bold and make the text bold.

Can you please help me in this regard.

6 Answers, 1 is accepted

Sort by
0
Martin
Top achievements
Rank 1
answered on 28 Jul 2014, 11:48 AM
You can find an example in the XAML SDK. More specifically you should take a look at the RichTextBox - GettingStarted example.
0
vikas
Top achievements
Rank 1
answered on 28 Jul 2014, 12:27 PM
Hi,
Can you please tell me as to how I can download the files.
0
Martin
Top achievements
Rank 1
answered on 28 Jul 2014, 01:45 PM
You can browse the files online, use a Git client or go to the main page of the XAML SDK and click the "Download ZIP" button on the right.
0
Petya
Telerik team
answered on 28 Jul 2014, 03:50 PM
Hello,

@Martin, thanks for taking the time to help the community out. We highly appreciate it.

@vikas, other than the SDK example Martin pointed you to, you could check the help article the project is related to here. Also, the SDK examples are easily accessible through the Samples Browser which you can download from here. Information about the browser is available in the Introducing WPF SDK Samples Browser blog post.

Regards,
Petya
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
vikas
Top achievements
Rank 1
answered on 30 Jul 2014, 07:28 AM
Hi,
I was able to download the sample and explore. Thanks for that .

But, in my case i am a giving window to set header and footer which in turn will get applied to a PDF document.
So, when the user sets formatting to text, how can i save it to database which can be used to apply to PDF document later.
Thanks,
0
Petya
Telerik team
answered on 31 Jul 2014, 02:09 PM
Hello,

You can import/export the content of RadRichTextBox using the format providers that come with the control. The Import/Export article in our documentation provides more details on that, as well as some code examples.

Alternatively, you can use one of DataProviders which wrap the format providers to bind the content of your editor to a property in your view model. There is an example of this approach in the SDK examples (also available here).

I hope this helps.

Regards,
Petya
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
Tags
RichTextBox
Asked by
vikas
Top achievements
Rank 1
Answers by
Martin
Top achievements
Rank 1
vikas
Top achievements
Rank 1
Petya
Telerik team
Share this question
or