在Canvas中,WPF Expander不会扩展吗?

时间:2012-04-28 04:41:17

标签: wpf wpf-controls expander

我有一个位于画布中的扩展器并希望将其展开,但是当它打开时它会向下移动。问题是这是我的代码:

  <Canvas Grid.Row="0" Panel.ZIndex="99"  Width="20" Height="20" >
            <Expander
                HorizontalAlignment="Left" 
                VerticalAlignment="Bottom"
                ExpandDirection="Up">
                <Grid>
                    <Button x:Name="btn1" Content="hhhh" Height="200" ></Button>
                </Grid>
            </Expander>
        </Canvas>

1 个答案:

答案 0 :(得分:-1)

ExpandDirection更改为Down,这样您想要显示的内容就会显示在扩展程序按钮下方,而不是在其上方。