将任意宽度的空白插入FlowDocument [英] Insert white space of arbitrary width to FlowDocument

查看:285
本文介绍了将任意宽度的空白插入FlowDocument的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以将给定宽度的空白作为Inline插入到FlowDocument?这样我就可以根据需要缩进"其他一些Inline.

Is there a way to insert white space of given width to FlowDocument as Inline ? So that I can 'indent' some other Inlines as I want.

如果可以在行中的某些x偏移上放置一些内联,这也可以解决问题.

If it was possible to place some inline on some x-offset in the line that would also solve the problem.

注意:此操作的目的是解决推荐答案

您可以使用容器类,例如:

You could use the container classes, e.g.:

<RichTextBox>
    <FlowDocument>
        <Paragraph>
            <InlineUIContainer>
                <FrameworkElement Width="200"/>
            </InlineUIContainer>
            <Run x:Name="RunChan" Text="Indented Text"/>
        </Paragraph>
    </FlowDocument>
</RichTextBox>

我不会真的推荐它.

在TextBlock中:

In a TextBlock:

<TextBlock>
    <InlineUIContainer>
        <FrameworkElement Width="200"/>
    </InlineUIContainer>
    <Run x:Name="RunChan" Text="Indented Text"/>
</TextBlock>

这篇关于将任意宽度的空白插入FlowDocument的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆