FlowDocument使用StackPanel布局需要之间加<Paragraph>

来源:互联网 发布:脂本 知乎 编辑:程序博客网 时间:2024/06/08 17:22


FlowDocument xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"                                  

   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"                                          

TextOptions.TextFormattingMode="Display" ColumnWidth="400" FontSize="14" FontFamily="宋体"> 


<FlowDocument.Resources>
 <Style TargetType="{x:Type Paragraph}">  <Setter Property="Margin" Value="0"/>  </Style>

 </FlowDocument.Resources> 
       <Paragraph> 
            <StackPanel Width="700"> 

                <Grid HorizontalAlignment="Stretch"  VerticalAlignment="Stretch" Margin="2" Height="77">

                  <Grid.RowDefinitions> 

                 <RowDefinition Height="40*"/> 

省略以下部分。。。

 ------------------------------

wpf布局控件因为继承的关系,如果不能直接放某类型的控件,可以多试试其他控件。

0 0