Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ProgressWindow.axaml « Windows « UVtools.WPF - github.com/sn4k3/UVtools.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 19694478f2d336f1e72ce55030a88c9468dc8a41 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
<controls:WindowEx xmlns="https://github.com/avaloniaui"
        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:controls="clr-namespace:UVtools.WPF.Controls"
        mc:Ignorable="d" d:DesignWidth="400" d:DesignHeight="400"
        x:Class="UVtools.WPF.Windows.ProgressWindow"
        Title="ProgressWindow"
        CanResize="False"
        ShowInTaskbar="False"
        WindowStartupLocation="CenterOwner"
        MinWidth="450"
        SizeToContent="WidthAndHeight"
        SystemDecorations="BorderOnly"
        Icon="/Assets/Icons/UVtools.ico"
        >

  <Border
    BorderBrush="WhiteSmoke"
    BorderThickness="5"
    CornerRadius="5"
    >
    <Grid RowDefinitions="Auto,Auto,Auto,Auto"
          ColumnDefinitions="*"
          >
      <TextBlock
        Grid.Row="0"
        Margin="10" Text="{Binding Progress.Title}"/>
      <TextBlock
        Grid.Row="1"
        Margin="10,0,10,10" Text="{Binding Progress.ElapsedTimeStr, StringFormat=Elapsed Time: {0}}"/>
      <TextBlock
        Grid.Row="2"
        Margin="10,0,10,10" Text="{Binding Progress.Description}" HorizontalAlignment="Center"/>

      <Grid
        Grid.Row="3"
        RowDefinitions="30" ColumnDefinitions="*,100">
        <ProgressBar
          Grid.Column="0"
          Minimum="0"
          Maximum="100"
          VerticalAlignment="Stretch"
          IsIndeterminate="{Binding Progress.IsIndeterminate}"
          Value="{Binding Progress.ProgressPercent}"  ShowProgressText="True"/>
        <Button
          IsEnabled="{Binding CanCancel}"
          Command="{Binding OnClickCancel}"
          Grid.Column="1"
          IsCancel="True"
          VerticalAlignment="Stretch"
          HorizontalAlignment="Stretch"
          VerticalContentAlignment="Center"
          HorizontalContentAlignment="Center"
          Content="Cancel"
          />
      </Grid>
    </Grid>
  </Border>
</controls:WindowEx>