FlowDocument占用一半的空间?

时间:2018-07-27 14:20:12

标签: c# wpf

输出: Image here

XAML:

        <UserControl x:Class="MaterialDesignDemo.Test"
                 xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                 xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                 xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
                 xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                 mc:Ignorable="d" 
                 d:DesignHeight="450" d:DesignWidth="800">




            <FlowDocumentReader  Visibility="Visible"  IsPrintEnabled="True" x:Name="fdViewer" Height="442"  >
            <FlowDocument PagePadding="0 0 0 0"   x:Name="FlowingDocument">

<Paragraph>
         Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna.
         Nunc viverra imperdiet enim. Fusce est. Vivamus a tellus.
         Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Proin pharetra nonummy pede. Mauris et orci.
         Aenean nec lorem. In porttitor. Donec laoreet nonummy augue.
         Suspendisse dui purus, scelerisque at, vulputate vitae, pretium mattis, nunc. Mauris eget neque at sem venenatis eleifend. Ut nonummy.

                 </Paragraph>



                   </FlowDocument>
    </FlowDocumentReader>
    </UserControl>

由于某种原因,它不是整个UserControl的大小而是一半?

例如,如果我尝试将TextAlignement设置为Center,它将使文本居中,但仍保留在左半部分,同样的问题。

0 个答案:

没有答案