私はC#Wpfの初心者であり、プログラミングによってパラグラが少ないフロードキュメントを作成したいと考えています。問題は、ページ間に大きなスペースがあり、サイズを最小限に抑えたいということです。
Xmlステートメントを使用して解決策を見つけましたが、プログラミングで解決したいと思います。
<FlowDocument>
<FlowDocument.Resources>
<!-- This style is used to set the margins for all paragraphs in the FlowDocument to 0. -->
<Style TargetType="{x:Type Paragraph}">
<Setter Property="Margin" Value="0"/>
</Style>
</FlowDocument.Resources>
<Paragraph>
Spacing between paragraphs is caused by margins set on the paragraphs. Two adjacent margins
will "collapse" to the larger of the two margin widths, rather than doubling up.
</Paragraph>
<Paragraph>
To eliminate extra spacing between two paragraphs, just set the paragraph margins to 0.
</Paragraph>
</FlowDocument>
どうすればいいですか?
助けてくれてありがとう。