是否可以使第一个字母变大,并使文本的其余部分围绕它对齐

时间:2014-02-05 09:59:48

标签: c# xaml windows-store-apps

是否可以将第一个字母设为大字,并使文本的其余部分与此图片对齐?enter image description here

如果是,那么如何?

1 个答案:

答案 0 :(得分:3)

使用FlowDocument元素可以非常愉快地实现这一目标。

    <FlowDocumentScrollViewer Margin="0,0,204,0">
        <FlowDocument>
            <Paragraph>
                <Figure HorizontalAnchor="ColumnLeft" Margin="0">
                    <Paragraph BreakColumnBefore="False" LineStackingStrategy="BlockLineHeight" LineHeight="55">
                        <Run FontSize="70">T</Run>
                    </Paragraph>
                </Figure><Run>his is a paragraph of text are it should wrap the first letter. Wheren there is lots of text, multiple lines will appear besides our larger character.</Run>
            </Paragraph>
            <Paragraph>
                <Run>This is the second paragraph in our body of text.</Run>
            </Paragraph>
        </FlowDocument>
    </FlowDocumentScrollViewer>

您可以阅读有关FlowDocument on MSDN

的更多信息