Font Size on RadRichTextBoxRibbonUI not synced with RadRichTextBox

4 posts, 1 answers
  1. Andrew
    Andrew avatar
    2 posts
    Member since:
    May 2020

    Posted 16 Jul Link to this post

    Using latest version of UI for WPF R2 2020 SP.

    I have a RadRichTextBox and RadRichTextBoxRibbonUI on a user control.

    All of the buttons on the ribbon view are synced with the selected text on the rich text box, other than font size. Note that if I highlight text and select a new font size, it works as expected, except that the newly selected size is not displayed in the ribbon view (the combobox is empty after the selection).

    Snippet of code attached to show that the Command binding is set correctly, or so I believe.

    Any help greatly appreciated.

     

    <telerik:RadRichTextBoxRibbonUI CollapseThresholdSize="50,50" VerticalAlignment="Top" DataContext="{Binding Commands, ElementName=radRichTextBox}" ApplicationButtonContent="File">

         .....

    </telerik:RadRichTextBoxRibbonUI>

    <telerik:DocumentRuler Grid.Row="1">
        <telerik:RadRichTextBox Name="radRichTextBox" LayoutMode="Paged" />
    </telerik:DocumentRuler>
    <telerik:RadRichTextBoxStatusBar Grid.Row="2"  AssociatedRichTextBox="{Binding ElementName=radRichTextBox, Mode=OneTime}" />

  2. Answer
    Tanya
    Admin
    Tanya avatar
    901 posts

    Posted 16 Jul Link to this post

    Hi Andrew,

    I have tested the behavior of the font size combo box in our Telerik Editor example and it seems to work as expected. Is your setup different? Are there any specific steps to reproduce this behavior?

    Regards,
    Tanya
    Progress Telerik

  3. Andrew
    Andrew avatar
    2 posts
    Member since:
    May 2020

    Posted 16 Jul in reply to Tanya Link to this post

    Hi Tanya,

    Thanks for the quick reply. I downloaded the source for the Editor example and found considerable differences between the RadRichTextBoxRibbonUI code and what was generated when I followed the instructions in the doco and had the code generated by dropping a RadRichTextBoxRibbonUI control from the toolbox onto the designer in visual studio.

    After taking the code from the Editor and using it in my application, everything is working, so perhaps someone might want to look at the code that is being autogenerated following the procedure in the documentation?

    Thanks again for your help.

    Cheers,

    Andrew.

  4. Tanya
    Admin
    Tanya avatar
    901 posts

    Posted 20 Jul Link to this post

    Hello Andrew,

    I am glad to hear that everything is now set up and working on your side.

    I have checked the XAML generation and the XAML from the example. The differences I am encountering are mostly related to the formatting of the code. Can you please share the result you are getting so I can check what is missing there and try to find what might be causing a difference?

    Regards,
    Tanya
    Progress Telerik

Back to Top