locked
displaying superscript trademark symbol in text block SL2

    Question

  • I have text coming from xml

    <usermsg>this is my msg ®</usermasg>

    How do I display this text in a text block and have the trademark symbol appear smaller than the other text?

    So the trademark would be using superscript?

    or ... I can live with having a diff font size for the tradmark symbol so that it appears smaller.

    Need help with either.

    this is for SL2

    Superscript for one symbol in the textbblock or having the symbol use a smaller font size than the other text in text block. 

     

    thanks

    cp

    Thursday, October 29, 2009 11:26 AM

Answers

  • Hi Colep,

    <msg>hello i am cole <Run FontSize="8" >®</Run> this is the rest</msg>

    would i need to put that in a cdata tag?

    That's based on your code.

    Is there a way to align the ® to align to the top?

    Yes.  You can put  ® and the content into different controls and control them seperately.

    Best regards,

    Jonathan

    Thursday, November 5, 2009 6:01 AM

All replies

  • You could put the copyright symbol in a seperate Run that had a smaller font size. See the TextBlock documentation for more information.

    Thursday, October 29, 2009 11:29 AM
  • thank you.

    that looks like what i need. but how could i modify my xml to make this work?

    so that this would be dynamic?

    in a perfect world I want to keep ally my content in xml.

     

    thanks cp

     

    Thursday, October 29, 2009 11:37 AM
  • Wrap the copyright in run tags with the font size. It is still valid Xml.

    Thursday, October 29, 2009 11:42 AM
  • like this? in xml

    <msg>hello i am cole <Run FontSize="8" >®</Run> this is the rest</msg>

    would i need to put that in a cdata tag?

    Is there a way to align the ® to align to the top?

    and i am slo not sure how to apply the above to the text block dynamically.

    I am currently saying <TextBlock x:Name = "txt" Text = "My text from xml"/> 

     

    Is there a way to just do this with superscript?

    thanks again

    cp

    Thursday, October 29, 2009 12:10 PM
  • Hi Colep,

    <msg>hello i am cole <Run FontSize="8" >®</Run> this is the rest</msg>

    would i need to put that in a cdata tag?

    That's based on your code.

    Is there a way to align the ® to align to the top?

    Yes.  You can put  ® and the content into different controls and control them seperately.

    Best regards,

    Jonathan

    Thursday, November 5, 2009 6:01 AM