I have code like this
<RichTextBox IsDocumentEnabled="True" Name="doc">
<FlowDocument>
<Section>
<BlockUIContainer>
<StackPanel>
<Image Height="30" Width="30" HorizontalAlignment="Left" Source="Notify.png">
</Image>
<TextBlock Text="message body">
</TextBlock>
</StackPanel>
</BlockUIContainer>
</Section>
<Section>
<Paragraph Margin="0,0,500,0" LineHeight="50">
<Paragraph.Background>
<ImageBrush ImageSource="bg1.png" Stretch="UniformToFill"/>
</Paragraph.Background>
test pure document text
</Paragraph>
<Paragraph>
<Run>
<Run.Background>
<ImageBrush ImageSource="bg1.png"/>
</Run.Background>
run back groud,run back groud,run back groudrun back groudrun back groudrun back groudrun back groudrun back groudrun back groudrun back groudrun back groud
</Run>
</Paragraph>
</Section>
<FlowDocument>
in this RichTextBox control , I add a control element and a document element. I could freely select text from the document element, while could not do it for UI control element.
Second part.
I wana set a Run element background like a control or container do. in above picture , the text block " run back groud,..." background is a little strange.
what effect I need is below.
Any Idea? thanks