show the RadRichTextBox selections' states problem

4 posts, 0 answers
  1. Chen
    Chen avatar
    12 posts
    Member since:
    Jul 2010

    Posted 03 Nov 2010 Link to this post

    Hello.

     Somewhile it shows the FontSize ,FontFamily and HorizontalAlignment only. And Somewhile it shows nothing. I want to show more, such as FontWight , UnderLine state and so on.

    And when I don't select text, and I set the FontSize, FontFamily,  FontWight, UnderLine and so on, they won't change the default text style. And the UnderLine attribute is readonly. How can I set it?

    Thanks.
    Chen
  2. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 04 Nov 2010 Link to this post

    Hi Chen,

    We are introducing default font properties in the next official release, Q3 2010, which is due in mid-November. As of now, you can change them as described in this forum post, which you might have already seen.
    The Underline property is ReadOnly, as there are various line types you can choose to underline something. You should use the UnderlineDecoration property in your case. All in one, this is how you set the FontWeight and the UnderlineDecoration:

    span.FontWeight = FontWeights.Bold;
    span.UnderlineDecoration = UnderlineTypes.Line;

    As for the selection event, there is a SelectedLayoutBoxChanged event, which RadRichTextBox exposes. Have you tried using that? You might also want to check out RadRichTextBoxRibbonUI if you still haven't.

    Kind regards,
    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
  3. Chen
    Chen avatar
    12 posts
    Member since:
    Jul 2010

    Posted 04 Nov 2010 Link to this post

    Hello Iva,

    Sorry for my unclear description. And thank you for your detail  answer.

    Exactly, I just want to show the detail message of  text selected in the RibbinBar.  

        xmlns:telerikRibbonBar="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.RibbonBar"
        <telerikRibbonBar:RadRibbonTab x:Name="ribbonBar" Grid.ColumnSpan="2">
                <telerikRibbonBar:RadRibbonGroup>
                            .......................

    The Demo http://demos.telerik.com/silverlight/beta/#RichTextBox/MSWord doesn't have this problem. When I select some text, the RibbinBar will change at the same time.
    Is it the problem of  version?

    Thanks.
    Chen
  4. Iva Toteva
    Admin
    Iva Toteva avatar
    1319 posts

    Posted 05 Nov 2010 Link to this post

    Hi Chen,

    Do you mean that when you select some bold text, for example, the Bold button in the RibbonBar does not appear pressed?
    You can see the code used in the demo by pressing the "View Code" button in the upper right corner. It uses RadRichTextBoxRibbonUI instead of RadRibbonBar, which extends its functionality. You can also recreate the whole RibbonUI by just adding RadRichTExtBoxRibbonUI to the page from the toolbox, or later from the context menu of the designer:
    http://blogs.telerik.com/blogs/posts/10-07-20/create_silverlight_word_processor_using_just_visual_studio_2010_designer.aspx

    Try it out and let us know if your problem persists.

    Regards,
    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
Back to Top