Communication between RadRichTextBoxRibbonUI and System.Windows.Control.RichTextBox

4 posts, 1 answers
  1. naresh
    naresh avatar
    3 posts
    Member since:
    Feb 2020

    Posted 10 Mar Link to this post

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

    How can we communicate between above two components.

  2. Dimitar
    Admin
    Dimitar avatar
    2859 posts

    Posted 10 Mar Link to this post

    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.
  3. naresh
    naresh avatar
    3 posts
    Member since:
    Feb 2020

    Posted 10 Mar in reply to Dimitar Link to this post

    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

  4. Answer
    Dimitar
    Admin
    Dimitar avatar
    2859 posts

    Posted 11 Mar Link to this post

    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.
Back to Top