WPF使用FlowDocument实现图文混排

代码:

<RichTextBox CaretBrush="#fff" Background="Transparent" BorderThickness="0">
    <FlowDocument FontSize="16" Foreground="#fff">
        <Paragraph LineHeight="22">
            <Run Text="{Binding Name}"></Run>
            <Image Height="16" Width="32" Stretch="Fill" Source="/SunCreate.Vipf.Client.Resources;component/Image/MainPage/重要.png" />
        </Paragraph>
    </FlowDocument>
</RichTextBox>
View Code

效果图:

 

posted @ 2019-08-14 18:50  0611163  阅读(1803)  评论(0编辑  收藏  举报