下面的xaml代码与Expander的边界重叠。 当我运行它,并单击第一个扩展器选项时,它将展开并显示富文本框。但是我无法滚动它。 但第二个扩展器没问题。 如何解决这个问题?
<Expander Header="Certificate" Margin="201,85,101,143">
<ScrollViewer Width="283" Height="106">
<RichTextBox Name="richTextBox1" Margin="0,0,0,0" Height="82" Width="221">
<FlowDocument>
<Paragraph>
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
</Paragraph>
</FlowDocument>
</RichTextBox>
</ScrollViewer>
</Expander>
<Expander Header="Challenge" Margin="201,122,86,81">
<ScrollViewer Width="283" Height="106">
<RichTextBox Name="richTextBox2" Margin="0,0,0,0" Height="82" Width="221">
<FlowDocument>
<Paragraph>
11 11 11 11 11 11 11 11 11 12 11 01 02 00 10 12 11 01
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
</Paragraph>
</FlowDocument>
</RichTextBox>
</ScrollViewer>
</Expander>
答案 0 :(得分:0)
<StackPanel>
<Expander Header="Certificate" >
<RichTextBox Name="richTextBox1" Width="283" Height="106" ScrollViewer.VerticalScrollBarVisibility="Auto">
<FlowDocument>
<Paragraph>
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
</Paragraph>
</FlowDocument>
</RichTextBox>
</Expander>
<Expander Header="Challenge" >
<RichTextBox Name="richTextBox2" Width="283" Height="106" ScrollViewer.VerticalScrollBarVisibility="Auto" >
<FlowDocument>
<Paragraph>
11 11 11 11 11 11 11 11 11 12 11 01 02 00 10 12 11 01
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
00 10 12 11 01 02 00 10 12 11 01 02 00 10 12 11 01 02
</Paragraph>
</FlowDocument>
</RichTextBox>
</Expander>
</StackPanel>