我有一个包含4列的网格。第一列中有一个ZIndex为99的Canvas,其中包含一个可展开内容。展开方向设置为RIGHT。当我点击标题时,可展开内容将超过第2列…这正是我想要的。我正在尝试在第4列内复制此操作(只是相反的方向),以便展开时它将显示在第3列上方。即使我将第二个可展开内容的ExpandDirection标记为“Left”,它仍会向右扩展并超出屏幕。
以下是有效的可展开内容:
以下是有效的可展开内容:
<Canvas Grid.Column="0" Panel.ZIndex="99" Grid.RowSpan="4" VerticalAlignment="Stretch" Margin="0,5">
<Expander ExpandDirection="Right" Style="{DynamicResource OptionsExpanderStyle}" VerticalAlignment="Stretch" Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Canvas}}}">
<Border BorderBrush="Black" BorderThickness="0,0,2,0">
<Grid Background="White">
</Grid>
</Border>
</Expander>
</Canvas>
以下是损坏的扩展器:
<Canvas x:Name="rightCanvas" Panel.ZIndex="99" Grid.RowSpan="4" Grid.Column="3" Margin="0,5">
<Expander ExpandDirection="Left" Style="{DynamicResource OptionsExpanderStyle}" HorizontalAlignment="Right" VerticalAlignment="Stretch" Height="{Binding ActualHeight, RelativeSource={RelativeSource AncestorType={x:Type Canvas}}}">
<Border BorderBrush="Black" BorderThickness="2,0,0,0">
<Grid Background="White" Width="150">
</Grid>
</Border>
</Expander>
</Canvas>