WdDownload.xaml 2.19 KB
<Window x:Class="Install.View.WdDownload"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Install.View"
        mc:Ignorable="d"
        Title="WdDownload" Height="172" Width="754">
    <Grid x:Name="grid_root">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition Height="auto"/>
        </Grid.RowDefinitions>
        <StackPanel Margin="5" DataContext="{Binding InstallWizard}">
            <ProgressBar Height="20" Margin="5" Maximum="1" Value="{Binding DownloadInfo_Progress,Mode=OneWay}" />
            <Grid Margin="5" >
                <Grid.ColumnDefinitions>
                    <ColumnDefinition/>
                    <ColumnDefinition Width="auto"/>
                </Grid.ColumnDefinitions>
                <TextBlock>
                    <Run Text="{Binding DownloadInfo_CurrSizeStr,Mode=OneWay}"/>/<Run Text="{Binding DownloadInfo_TotalSizeStr,Mode=OneWay}"/>
                </TextBlock>
                <TextBlock  Grid.Column="1">
                    <Run Text="{Binding DownloadInfo_SpeedStr,Mode=OneWay}"/> | 已经耗时:<Run Text="{Binding DownloadInfo_ElapsedTimeStr,Mode=OneWay}"/> | 估计剩余时间:<Run Text="{Binding DownloadInfo_RemainingTimeStr,Mode=OneWay}"/>
                </TextBlock>
            </Grid>
            <TextBlock Margin="5" Text="{Binding DataContext.Msg,ElementName=grid_root}"/>
        </StackPanel>
        <Grid Grid.Row="1" Style="{StaticResource BottomPanel}" >
            <StackPanel Style="{StaticResource BtnSp}" >
                <Button Style="{StaticResource NormalBtn}" Content="打开" Command="{Binding ExecCmd}" Visibility="{Binding IsReady, Converter={StaticResource visbilityconv}}" />
                <Button Style="{StaticResource NormalBtn}" Content="取消" Command="{Binding CancelCmd}" Visibility="{Binding IsReady, Converter={StaticResource visbilityconv},ConverterParameter=HiddenWhenTrue}" />
            </StackPanel>
        </Grid>
    </Grid>
</Window>