コントロールDockPanel
の下部に (不透明度を使用して) を配置したい:幅は現在の幅と同じにする必要があります。Image
DockPanel
Image
XAML は次のとおりです。
<Window
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Grid>
<Image Source="..." />
<DockPanel VerticalAlignment="Bottom" LastChildFill="True" Opacity="0.5">
<Button Content="Play" />
<ProgressBar Value="50" Maximum="100" Height="40" />
</DockPanel>
</Grid>
</Window>
この XAML の場合: の幅は幅DockPanel
と等しくありませんImage
。幅はDockPanel
width に設定されWindow
ます。