×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Sep 2013
    Posts
    7

    Question subscript/superscript text in richtextbox

    Is it possible to write subscript and superscript text in a richtextbox (or, if not, in a textbox or another WP8 element)?

    Up to now I found a possibility to write sub-/superscript numbers using unicode, but that's not possible for all letters:
    http://www.fileformat.info/info/unic...ripts/list.htm

    And in Windows 8 apps one can use the typography property for paragraphs in the richtextbox, but this property isn't available for WP8:
    <Paragraph>
    2<Run Typography.Variants="Superscript">3</Run>
    14<Run Typography.Variants="Superscript">th</Run>
    </Paragraph>
    Does somebody know if there is any equivalent to this property for WP8?


    Thank you very much,
    Alex

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2013
    Location
    Dublin, Ireland
    Posts
    544

    Re: subscript/superscript text in richtextbox

    There are a couple of answer on StackOverflow...

    http://stackoverflow.com/questions/1...t-in-textblock

    http://stackoverflow.com/questions/1...indows-phone-8

    The main thing to remember is that Windows Phone 8 and Windows 8 are quite different, especially in terms of XAML support, so text formatting varies a lot.

  3. #3
    Registered User
    Join Date
    Sep 2013
    Posts
    7

    Re: subscript/superscript text in richtextbox

    Thank you very much theothernt! That works great!

    As I mentioned I use RichTextBoxes in my app, so I got to the following solution:
    <RichTextBox>
    <Paragraph>
    <Run Text="ExampleText"/>
    <InlineUIContainer>
    <TextBlock Text="ExampleIndex" Margin="0,5,0,0" FontSize="15"/>
    </InlineUIContainer>
    </Paragraph>
    </RichTextBox>

Similar Threads

  1. Math formulas within text (RichTextBox)
    By madridistalex in forum Windows Phone General
    Replies: 3
    Last Post: 2013-09-09, 18:52
  2. Replies: 8
    Last Post: 2009-12-09, 06:27
  3. RichTextBox Error
    By ash_21 in forum Symbian
    Replies: 10
    Last Post: 2009-07-31, 06:16
  4. Superscript and subscript in J2ME
    By yoursgangadhar in forum Mobile Java General
    Replies: 1
    Last Post: 2009-03-20, 12:22
  5. Subscript problem
    By morjens in forum Symbian User Interface
    Replies: 0
    Last Post: 2005-12-19, 10:24

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×