Answered FlowDocument PageHeight not working

Tutte le risposte

  • giovedì 2 agosto 2012 06:58
     
     
  • giovedì 2 agosto 2012 07:19
     
     

    Hi all,

    How Can  I make paging illusion in RichTextBox?

    Regards 

    Agrawal

  • venerdì 3 agosto 2012 10:41
    Moderatore
     
     Con risposta Contiene codice

    Hi Agrawal,

    You can't see any different after change document.PageHeight is because you didn't add a FLowDocument into your RichTextBox, try below code:

     <RichTextBox x:Name="Rtb1" Grid.Row="1" Background="Beige" >
                <FlowDocument>
                    <Paragraph Background="BlanchedAlmond">
                        This uses automatic page sizing with minimum page size of 3 by 5 inches,
          and a maximum page size of 6 by 10 inches.
                    </Paragraph>
                </FlowDocument>
            </RichTextBox>
            <RichTextBox x:Name="Rtb2" Grid.Row="2" Background="Bisque" >
                <FlowDocument>
                    <Paragraph Background="BlanchedAlmond">
                        This uses automatic page sizing with minimum page size of 3 by 5 inches,
          and a maximum page size of 6 by 10 inches.
                    </Paragraph>
                </FlowDocument>
            </RichTextBox>

    Hope it helps.

    Have a nice day.


    Annabella Luo[MSFT]
    MSDN Community Support | Feedback to us