Solved

How to apply superscript for particular part of string or flowdocument

Posted on 2010-09-14
3
996 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

758 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

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now