SuperScript / SubScript web application

2 posts, 0 answers
  1. paweb
    paweb avatar
    1 posts
    Member since:
    Jan 2011

    Posted 18 Jan 2011 Link to this post

    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 ?
  2. Boby
    Admin
    Boby avatar
    763 posts

    Posted 20 Jan 2011 Link to this post

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