locked
RichTextBlock vs. Overflow RRS feed

  • Question

  • I am studying the C# Print Sample and found the following issue:

    In ScenarioOutput8, I removed the image and the associated indentation, thus the grid is simplified as follows:

            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>   (header)
                <RowDefinition Height="4*"/>      (textContent)
                <!--<RowDefinition Height="3*"/> 4, 3, 3 -->
                <RowDefinition Height="3*"/>      (continuationPageLinkedContainer)
                <RowDefinition Height="Auto"/>   (footer)
            </Grid.RowDefinitions>
            <!--<Grid.ColumnDefinitions>
                <ColumnDefinition Width="6*" />
                <ColumnDefinition Width="4*"/>
            </Grid.ColumnDefinitions>-->

    As you can see there is a partition 4:3 between the RichTextBlock "textContent" and the RichTextBlockOverflow "continuationPageLinkedContainer". However, it is purely by chance that the result is properly spaced in the resulting print page; if you change the ratio for instance to 1:1 as follows:

                <RowDefinition Height="*"/>         (textContent)
                <RowDefinition Height="*"/>         (continuationPageLinkedContainer)

    you get an extra space in the middle of the page.

    I tried also:

                <RowDefinition Height="*"/>         (textContent)
                <RowDefinition Height="0"/>         (continuationPageLinkedContainer)

    but in this case I lose the first line of text in page 2.

    Is there a way to overcome this, and obtain a perfectly formatted document?

    Thanks.

    Friday, August 23, 2013 11:08 AM

Answers