有没有办法将Height
元素的背景Run
设置为与WPF中的LineHeight
相同?这是我的问题的演示,黄色背景是我的预期高度。
Demo of my question
<RichTextBox IsReadOnly="True" Focusable="False" BorderThickness="0">
<FlowDocument>
<Paragraph LineHeight="30" LineStackingStrategy="BlockLineHeight">
<Run>How to set the run element background height as LineHeight?</Run>
<Run Background="Gray">How to set the run element background height as LineHeight?</Run>
<Run>How to set the run element background height as LineHeight?</Run>
</Paragraph>
</FlowDocument>
</RichTextBox>