How can I define three paragraphs under one section ?

Platform: WPF| Category : Flow Content, Printing

We can define three paragraphs under one section as follows.

In the following example, the section has a “Background” property value of Red, therefore the background color of the paragraphs is also red.

[XAML]

<FlowDocument xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
  xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
  <!-- By default, Section applies no formatting to elements contained
       within it. However, in this example, the section has a Background
       property value of 'Red', therefore, the three paragraphs (the block)  
       inside the section also have a red background. -->
  <Section Background='Red'>
    <Paragraph>
      Paragraph 1
    </Paragraph>
    <Paragraph>
      Paragraph 2
    </Paragraph>
    <Paragraph>
      Paragraph 3
    </Paragraph>
  </Section>
</FlowDocument>

Share with

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.