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

Communication between RadRichTextBoxRibbonUI and System.Windows.Control.RichTextBox

3 Answers 67 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
naresh
Top achievements
Rank 1
naresh asked on 10 Mar 2020, 10:28 AM

Created the visual studio project with
telerik:RadRichTextBoxRibbonUI and System.Windows.Controls.RichtextBox

How can we communicate between above two components.

3 Answers, 1 is accepted

Sort by
0
Dimitar
Telerik team
answered on 10 Mar 2020, 01:03 PM

Hello Naresh,

You need to set the DataContext of the RadRichTextBoxRibbonUI. Here is how it should look:

 <telerik:RadRichTextBoxRibbonUI x:Name="radRichTextBoxRibbonUI" CollapseThresholdSize="50,50" VerticalAlignment="Top"  DataContext="{Binding Commands, ElementName=radRichTextBox}">

Detailed information about this is available here: RadRichTextBoxRibbonUI.

Let me know how this works for you.

Regards,
Dimitar
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
naresh
Top achievements
Rank 1
answered on 11 Mar 2020, 03:01 AM

Hi Dimitir,

 

We would like to use WPF RichTextBox with RadRichTextBoxRibbonUI and NOT RadRichTextBox. Is this possible?

Setting DataContext to WPF RichTextBox like mentioned by you did not work.

 

P.S. Apologies for multiple posts. We are on strict schedule and wanted some answers quickly.

--Naresh

0
Accepted
Dimitar
Telerik team
answered on 11 Mar 2020, 11:37 AM

Hi Naresh,

There is no direct way for this. The RadRichTextBoxRibbonUI has specific bindings that are made for the commands of RadRichTextBox and they will not work with the standard RichTextBox. You can replace the bindings or add event handlers for each menu item and perform the specific action with the RichTextBox.  

Let me know if you have any other questions.

Regards,
Dimitar
Progress Telerik

Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
RichTextBox
Asked by
naresh
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
naresh
Top achievements
Rank 1
Share this question
or