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

SuperScript / SubScript web application

1 Answer 80 Views
RichTextBox
This is a migrated thread and some comments may be shown as answers.
paweb
Top achievements
Rank 1
paweb asked on 18 Jan 2011, 09:53 PM
Hello i must implement supscript in RichTextBox for my University,

in WPF superscript is:

var currentAlignment = richTextBox.Selection.GetPropertyValue(Inline.BaselineAlignmentProperty);
BaselineAlignment newAlignment = ((BaselineAlignment)currentAlignment == BaselineAlignment.Superscript) ? BaselineAlignment.Baseline : BaselineAlignment.Superscript;
richTextBox.Selection.ApplyPropertyValue(Inline.BaselineAlignmentProperty, newAlignment);
richTextBox.Selection.ApplyPropertyValue(Inline.FontSizeProperty, (double)8);


But how to implement Inline.BaselineAlignmentProperty in Web Application ?

1 Answer, 1 is accepted

Sort by
0
Boby
Telerik team
answered on 20 Jan 2011, 09:28 AM
Hello Paweb,
This forum is about RadRichTextBox - Telerik's commercial alternative to Microsoft's RichTextBox.
In RadRichTextBox, the behavior you need can be easily implemented, like this:
this.radRichTextBox.ChangeBaselineAlignment(BaselineAlignment.Subscript);
which changes baseline alignment of the selection to subscript.

All the best,
Boby
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
RichTextBox
Asked by
paweb
Top achievements
Rank 1
Answers by
Boby
Telerik team
Share this question
or