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

效果图:

 

你可能感兴趣的:(WPF使用FlowDocument实现图文混排)