2
有沒有在流文檔或system.windows.control RichTextBox(wpf)中創建掛起縮進的方法?如果它能在流程文檔中工作,當我將它加載到RichTextBox中以顯示它時,它會保持它的形式嗎?在流文檔或WPF RichTextBox中創建掛入縮進
有沒有在流文檔或system.windows.control RichTextBox(wpf)中創建掛起縮進的方法?如果它能在流程文檔中工作,當我將它加載到RichTextBox中以顯示它時,它會保持它的形式嗎?在流文檔或WPF RichTextBox中創建掛入縮進
在FlowDocument段落中,您可以將左邊距設置爲懸掛縮進值,然後將TextIndent設置爲該值的負值。下面是一個例子:在這裏縮進WPF Documents - Indenting Paragraphs
希望這有助於
<Grid>
<Grid.RowDefinitions>
<RowDefinition />
<RowDefinition />
</Grid.RowDefinitions>
<FlowDocumentScrollViewer>
<FlowDocument>
<Section>
<Paragraph TextIndent="-30" Margin="30,20,0,0">
The first line of this paragraph is not indented, but the rest of the lines will be indented by 30 units. The first line of this paragraph is not indented, but the rest of the lines will be indented by 30 units.
</Paragraph>
</Section>
</FlowDocument>
</FlowDocumentScrollViewer>
<RichTextBox Grid.Row="1">
<FlowDocument>
<Section>
<Paragraph TextIndent="-60" Margin="60,20,0,0">
The first line of this paragraph is not indented, but the rest of the lines will be indented by 60 units. The first line of this paragraph is not indented, but the rest of the lines will be indented by 60 units.
</Paragraph>
</Section>
</FlowDocument>
</RichTextBox>
</Grid>
更多的細節,關於