Solved

How to apply superscript for particular part of string or flowdocument

Posted on 2010-09-14
3
1,008 Views
Last Modified: 2013-12-16
Please suggest on howto apply superscript for particular part of string or flowdocument.
0
Comment
Question by:Mohit_Kaushal
  • 2
3 Comments
 
LVL 12

Accepted Solution

by:
rajapandian_81 earned 125 total points
ID: 33680626
Refer
http://msdn.microsoft.com/en-us/library/system.windows.baselinealignment.aspx

<Page xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <FlowDocumentReader>
        <FlowDocument ColumnWidth="800">
            <Paragraph Background="Green">               
                <Span FontSize="40">Baseline:</Span>
                <Span BaselineAlignment="Subscript">Subscript</Span>
                <Span BaselineAlignment="Baseline">Baseline</Span>
                <Span BaselineAlignment="Superscript">Superscript</Span>
            </Paragraph>            
        </FlowDocument>
    </FlowDocumentReader>
</Page>

Open in new window

0
 

Author Comment

by:Mohit_Kaushal
ID: 33686886
Thanks a lot rajapandian_81: I used the same approach to work with code as well.

Paragraph myParagraph = new Paragraph();
Span mySpan = new Span(new Run(myText));
mySpan .BaselineAlignment = BaselineAlignment.Superscript;
myParagraph .Inlines.Add(verseSpan);

FlowDocument myFlowDocument = new FlowDocument();
myFlowDocument.Blocks.Add(myParagraph);
0
 
LVL 12

Expert Comment

by:rajapandian_81
ID: 33689006
Welcome :-)
0

Featured Post

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question