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

效果图:

猜你喜欢

转载自www.cnblogs.com/s0611163/p/11354005.html
今日推荐