0
<Expander Header="More options" Margin="281,218,39,12">
    <Button Height="29" Width="111"> hello </Button>
</Expander>

上面的代码有效。但:

<Expander Header="More options" Margin="281,218,39,12">
    <RichTextBox Name="richTextBox1" Margin="100,50,200,30" Height="30" Width="80">
        <FlowDocument>
            <Paragraph>Hi how are you?</Paragraph>
        </FlowDocument>
    </RichTextBox>
</Expander>

这行不通。为什么?如何使这项工作?

4

1 回答 1

1

请删除边距并避免设置静态高度和宽度,它会起作用。

<Expander Header="More options" >
    <RichTextBox Name="richTextBox1" >
        <FlowDocument>
            <Paragraph>Hi how are you?</Paragraph>
        </FlowDocument>
    </RichTextBox>
</Expander>
于 2013-07-19T15:09:53.030 回答