0
我有以下佈局如何強制元素溢出網格內它
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid Height="100" Background="Wheat" Opacity="0.4">
<StackPanel Orientation="Vertical" VerticalAlignment="Bottom">
<Slider Orientation="Vertical" Height="170" HorizontalAlignment="Center" Background="White" />
<Button Content="Btn" Width="100"/>
</StackPanel>
</Grid>
</Grid>
在這種情況下電網將剪輯滑塊,溢出電網的其餘部分。 所以我越來越喜歡這個 結果,而我想造成這樣 所以,我怎麼能強迫滑塊溢出電網無剪輯?這是否有其他解決方案? 事實上,我有更復雜的佈局,所以現在歡迎使用Canvas而不是Grid。
您是否需要外部'Grid'(「LayoutRoot」),除非您需要另外一個網格,否則您最好將其更改爲'DockPanel'。 – CodingGorilla