使用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>