我有一个WPF windown,其中有一个FlowDocumentScrollViewer,并将FlowDocument作为其子级。当然,在FlowDocument元素内部,我具有网格,文本框等,它们都可以正常工作,但是只要单击它们,滚动条就会一直向下滚动。代码是这样的:
<FlowDocumentScrollViewer Grid.Row="1" Grid.Column="1">
<FlowDocument x:Name="flowDoc" PagePadding="0">
<Section>
<BlockUIContainer>
<Border BorderBrush="Red" BorderThickness="2">
<Grid x:Name="masterGrid" Height="1500">
<!--window structure here-->
</Grid>
</Border>
</BlockUIContainer>
</Section>
</FlowDocument>
</FlowDocumentScrollViewer>
这种行为不是所希望的,但是我也不知道是什么原因造成的。如何防止它发生?