WPF扩展器在画布内时不会向上扩展?
我有一个位于画布中的扩展器,想将其向上扩展,但当它打开时,切换按钮会向下移动。问题出在哪里,这是我的代码:WPF扩展器在画布内时不会向上扩展?,wpf,wpf-controls,expander,Wpf,Wpf Controls,Expander,我有一个位于画布中的扩展器,想将其向上扩展,但当它打开时,切换按钮会向下移动。问题出在哪里,这是我的代码: <Canvas Grid.Row="0" Panel.ZIndex="99" Width="20" Height="20" > <Expander HorizontalAlignment="Left" VerticalAlignment="Bottom"
<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>
将ExpandDirection更改为Down,这样您要显示的内容将显示在expander按钮下方,而不是上方。@Dave:谢谢,但我希望这些内容显示在expander按钮上方!谢谢,但我以前见过,这不是我需要的。