문제

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

The above code works. But:

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

This will not work. Why? How to make this work?

도움이 되었습니까?

해결책

Please remove the Margin and avoid setting static Height and Width, it will work.

<Expander Header="More options" >
    <RichTextBox Name="richTextBox1" >
        <FlowDocument>
            <Paragraph>Hi how are you?</Paragraph>
        </FlowDocument>
    </RichTextBox>
</Expander>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top