我有一個的FlowDocument內的一些段落,和我需要的是證明所有行(即使有斷行線)WPF:如何證明中段落的所有行(以換行符太)
這裏有一個代碼示例:
<Paragraph TextAlignment="Justify">
"One of the most important operations necessary when text materials
are prepared for printing or display is the task of dividing long
paragraphs into individual lines.<LineBreak/>
When this job has been done well,
people will not be aware of the fact that the words they are reading
have been broken apart arbitrarily and placed into a somewhat rigid
and unnatural rectangular framework; but if the job has been done
poorly, readers will be distracted by bad breaks that interrupt
their train of thought."
</Paragraph>
上面會沒有理由,有一個換行符的線,這條線將左對齊的輸出,我需要的是所有的線寬度相同線路
如何這可以實現嗎? (注意,如果一個段落有換行符並且設置爲對齊,例如,如果我們在一行上有3個單詞,我們將在左邊有1個單詞,那麼期望的輸出是以ms爲單位可實現的相同輸出,在中心之一,一個在右邊)
感謝, 山姆
如果上面是無法實現的,作爲一種替代我想手動證明文本知道每一行的換行符,可以以某種方式實現嗎?比如爲每一行設置一個寬度和手動間距,以便我得到一個合理的段落? – sam 2010-04-30 07:55:44