为什么表单不是一样的?

时间:2014-09-22 19:44:22

标签: c# wpf xaml view groupbox

使用GroupBox,填充内容。相同的内容有时会拉伸GroupBox,有时不会,并且无法完全看到。为什么呢?

<GroupBox>
    <GroupBox.Header>
        <TextBlock Text="{Binding Caption}" 
                   Foreground="#FF00A3E9" 
                   FontSize="12"/>
    </GroupBox.Header>
    <GroupBox.Content>
        <StackPanel HorizontalAlignment="Stretch" 
                    VerticalAlignment="Stretch" 
                    Orientation="Vertical" 
                    Margin="0,-10,0,0">
            <Grid ... />              
            <FlowDocumentScrollViewer VerticalAlignment="Stretch" 
                                      VerticalContentAlignment="Stretch" 
                                      HorizontalAlignment="Stretch" 
                                      HorizontalContentAlignment="Stretch" 
                                      VerticalScrollBarVisibility="Disabled"  
                                      IsSelectionEnabled="False" 
                                      Background="Blue" 
                                      Margin="0,0,0,-7" 
                                      Document="{Binding PartData}" />
            <Grid ... />
        </StackPanel>
    </GroupBox.Content>
</GroupBox>

0 个答案:

没有答案