|
6 | 6 | xmlns:vm="clr-namespace:Upgrade.Avalonia.ViewModels" |
7 | 7 | xmlns:services="clr-namespace:Common.Avalonia.Services;assembly=Common.Avalonia" |
8 | 8 | xmlns:cvt="clr-namespace:Common.Avalonia.Converters;assembly=Common.Avalonia" |
| 9 | + xmlns:u="https://irihi.tech/ursa" |
9 | 10 | mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
10 | 11 | x:Class="Upgrade.Avalonia.Views.MainView" |
11 | 12 | x:DataType="vm:MainViewViewModel"> |
|
16 | 17 | </UserControl.Resources> |
17 | 18 |
|
18 | 19 | <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Spacing="10" MinWidth="550"> |
19 | | - <StackPanel Orientation="Horizontal" HorizontalAlignment="Center"> |
20 | | - <Image |
21 | | - Margin="30" |
22 | | - Width="150" |
23 | | - Height="150" |
24 | | - Source="/Assets/GeneralUpdate.png" /> |
25 | | - <Image |
26 | | - Margin="30" |
| 20 | + <Panel> |
| 21 | + <ProgressBar |
| 22 | + Name="Bar" |
| 23 | + Theme="{DynamicResource ProgressRing}" |
| 24 | + Width="200" |
| 25 | + Height="200" |
| 26 | + Classes.Success="{Binding Status, |
| 27 | + Converter={StaticResource EnumToBooleanConverter}, |
| 28 | + ConverterParameter={x:Static services:DownloadStatus.Completed}, |
| 29 | + Mode=OneWay}" |
| 30 | + Value="{Binding Statistics.ProgressPercentage}"> |
| 31 | + <ProgressBar.Styles> |
| 32 | + <Style Selector="ProgressBar"> |
| 33 | + <Setter Property="Transitions"> |
| 34 | + <Transitions> |
| 35 | + <DoubleTransition Easing="CubicEaseInOut" Property="Value" Duration="0:0:0.3" /> |
| 36 | + <BrushTransition Property="Foreground" Duration="0:0:0.3" /> |
| 37 | + </Transitions> |
| 38 | + </Setter> |
| 39 | + </Style> |
| 40 | + </ProgressBar.Styles> |
| 41 | + </ProgressBar> |
| 42 | + <u:Avatar |
27 | 43 | Width="150" |
28 | 44 | Height="150" |
29 | | - Source="{SvgImage /Assets/Ursa.svg}" /> |
30 | | - </StackPanel> |
| 45 | + Opacity="{Binding Statistics.ProgressPercentage, |
| 46 | + Converter={x:Static cvt:ProgressConverter.ProgressToOpacityConverter}}" |
| 47 | + Source="/Assets/GeneralUpdate.png"> |
| 48 | + <u:Avatar.Styles> |
| 49 | + <Style Selector="Image"> |
| 50 | + <Setter Property="Transitions"> |
| 51 | + <Transitions> |
| 52 | + <DoubleTransition Easing="CubicEaseInOut" Property="Opacity" Duration="0:0:0.3" /> |
| 53 | + </Transitions> |
| 54 | + </Setter> |
| 55 | + </Style> |
| 56 | + </u:Avatar.Styles> |
| 57 | + </u:Avatar> |
| 58 | + </Panel> |
31 | 59 |
|
32 | 60 | <SelectableTextBlock |
33 | 61 | HorizontalAlignment="Center" |
|
66 | 94 | Text="{Binding Status,Converter={x:Static cvt:EnumConverter.EnumToDescriptionConverter}}" /> |
67 | 95 | </Panel> |
68 | 96 |
|
69 | | - <ProgressBar |
70 | | - Name="Bar" |
71 | | - ShowProgressText="True" |
72 | | - Classes.Success="{Binding Status, |
73 | | - Converter={StaticResource EnumToBooleanConverter}, |
74 | | - ConverterParameter={x:Static services:DownloadStatus.Completed}, |
75 | | - Mode=OneWay}" |
76 | | - Value="{Binding Statistics.ProgressPercentage}"> |
77 | | - <ProgressBar.Styles> |
78 | | - <Style Selector="ProgressBar"> |
79 | | - <Setter Property="Transitions"> |
80 | | - <Transitions> |
81 | | - <DoubleTransition Easing="CubicEaseInOut" Property="Value" Duration="0:0:0.3" /> |
82 | | - <BrushTransition Property="Foreground" Duration="0:0:0.3" /> |
83 | | - </Transitions> |
84 | | - </Setter> |
85 | | - </Style> |
86 | | - </ProgressBar.Styles> |
87 | | - </ProgressBar> |
| 97 | + |
88 | 98 | <Border |
89 | 99 | Padding="10" |
90 | 100 | Background="{DynamicResource SemiBackground0Color}" |
|
0 commit comments