2

当我使用Property 在in内的元素BorderThickness上绘制边框时,有时边框看起来很模糊ParagraphFlowDocumentFlowDocumentScrollViewer

这是我的代码片段。

<Grid>
    <FlowDocumentScrollViewer>
        <FlowDocument>
            <Paragraph BorderBrush="Black" BorderThickness="0.5">This is a paragraph</Paragraph>
            <Paragraph BorderBrush="Black" BorderThickness="0.5">This is a paragraph</Paragraph>
            <Paragraph BorderBrush="Black" BorderThickness="0.5">This is a paragraph</Paragraph>
        </FlowDocument>
    </FlowDocumentScrollViewer>
</Grid>

我试图将SnapsToDevicePixels="True"andUseLayoutRounding="True"放在Gridor上FlowDocumentScrollViewer(因为它Paragraph本身不支持这些属性),但没有任何反应。

这个问题还有问题吗?如果没有,我该如何解决?

4

1 回答 1

4
<Grid RenderOptions.EdgeMode="Aliased">
        <FlowDocumentScrollViewer>
            <FlowDocument>
                <Paragraph Margin="2" BorderBrush="Black" BorderThickness=".5">This is a paragraph</Paragraph>
                <Paragraph Margin="2" BorderBrush="Black" BorderThickness=".5">This is a paragraph</Paragraph>
                <Paragraph Margin="2" BorderBrush="Black" BorderThickness=".5">This is a paragraph</Paragraph>
            </FlowDocument>
        </FlowDocumentScrollViewer>
    </Grid>
于 2013-03-31T17:58:23.830 回答