0

下面的 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>
4

1 回答 1

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>
于 2013-07-19T16:21:51.587 回答