0
我想创建一个启动画面,其中图像和加载状态(带进度条的文本块)位于另一个之上。带DockPanel的透明TextBlock
我已经写了下面的代码:
<Window
WindowStyle="None" ResizeMode="NoResize"
d:DesignHeight="300" d:DesignWidth="300">
<DockPanel LastChildFill="True">
<Grid DockPanel.Dock="Bottom" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition/>
<RowDefinition/>
</Grid.RowDefinitions>
<TextBlock Text="{Binding Text}" Grid.Row="0" Background="Transparent"/>
<ProgressBar Maximum="100" Value="{Binding ProgressValue, Mode=OneWay}" Height="5" Grid.Row="1" IsIndeterminate="{Binding IsIndeterminate}"/>
</Grid>
<Image Source="{Binding ImageSource}" Stretch="None"/>
</DockPanel>
不幸的TextBlock还是删除它位于顶部的图像的某些部分。我认为原因是DockPanel,但我不知道如何以其他方式做到这一点。