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

show the RadRichTextBox selections' states problem

3 Answers 76 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
Chen
Top achievements
Rank 1
Chen asked on 03 Nov 2010, 09:34 AM
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

3 Answers, 1 is accepted

Sort by
0
Iva Toteva
Telerik team
answered on 04 Nov 2010, 09:41 AM
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
0
Chen
Top achievements
Rank 1
answered on 04 Nov 2010, 10:01 AM
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
0
Iva Toteva
Telerik team
answered on 05 Nov 2010, 08:40 AM
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
Tags
RichTextBox
Asked by
Chen
Top achievements
Rank 1
Answers by
Iva Toteva
Telerik team
Chen
Top achievements
Rank 1
Share this question
or