|
5 | 5 | xmlns:local="using:FastCopy" |
6 | 6 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
7 | 7 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
8 | | - mc:Ignorable="d"> |
| 8 | + mc:Ignorable="d" |
| 9 | + RequestedTheme="Dark"> |
9 | 10 |
|
10 | 11 | <Page.Resources> |
11 | 12 | <Style x:Key="HeaderTextStyle" TargetType="TextBlock"> |
|
54 | 55 | <x:Double x:Key="SeperatorLineOpacity">0.1</x:Double> |
55 | 56 | </Page.Resources> |
56 | 57 |
|
57 | | - <Grid Margin="15" x:Name="MainPanel"> |
| 58 | + <Grid Margin="15" x:Name="MainPanel" SizeChanged="MainPanel_SizeChanged"> |
58 | 59 | <Grid.RowDefinitions> |
59 | 60 | <RowDefinition Height="Auto"/> |
60 | 61 | <RowDefinition Height="Auto"/> |
61 | 62 | <RowDefinition Height="Auto"/> |
62 | 63 | <RowDefinition Height="Auto"/> |
63 | | - <RowDefinition Height="Auto"/> |
| 64 | + <RowDefinition Height="*"/> |
64 | 65 | <RowDefinition Height="Auto"/> |
65 | 66 | </Grid.RowDefinitions> |
66 | 67 |
|
67 | 68 | <TextBlock Style="{StaticResource HeaderTextStyle}"> |
68 | | - <Run Text="{x:Bind ViewModel.Percent,Converter={StaticResource NumberToStringConverter}, ConverterParameter=2, Mode=OneWay}"/>% Complete |
| 69 | + <Run Text="{x:Bind ViewModel.Percent,Converter={StaticResource NumberToStringConverter}, ConverterParameter=2, Mode=OneWay}"/>% |
69 | 70 | </TextBlock> |
70 | 71 |
|
71 | 72 | <TextBlock x:Name="SpeedText" Text="{x:Bind ViewModel.SpeedText,Mode=OneWay}" Style="{StaticResource StatusTextStyle}" HorizontalAlignment="Right" VerticalAlignment="Bottom"/> |
|
99 | 100 | </Button> |
100 | 101 | </StackPanel> |
101 | 102 |
|
102 | | - <local:ProgressBarEx x:Name="ProgressBar" Loaded="ProgressBar_Loaded" Margin="0,10,0,0" HorizontalAlignment="Stretch" |
| 103 | + <local:ProgressBarEx x:Name="ProgressBar" Loaded="ProgressBar_Loaded" Margin="0,10,0,0" HorizontalAlignment="Stretch" |
103 | 104 | Percent="{x:Bind ViewModel.Percent, Mode=OneWay}" Height="5" Color="Green" Grid.Row="2"/> |
104 | | - |
| 105 | + |
105 | 106 | <!---Red: BB0000 --> |
106 | 107 | <!--Duplicate files area--> |
107 | | - <Grid Grid.Row="3"> |
| 108 | + <Grid Grid.Row="3" x:Name="DuplicateFileInfoGrid" x:Load="False"> |
108 | 109 | <Grid.ColumnDefinitions> |
109 | 110 | <ColumnDefinition Width="*"/> |
110 | 111 | <ColumnDefinition Width="*"/> |
|
126 | 127 | <Line Margin="0,0,0,0" Grid.Row="1" Grid.ColumnSpan="2" X1="0" X2="500" Y1="45" Y2="45" Stroke="{StaticResource SeperatorLineColor}" Opacity="{StaticResource SeperatorLineOpacity}"/> |
127 | 128 | </Grid> |
128 | 129 |
|
129 | | - <ItemsRepeater Grid.Row="4" Margin="0,24,0,0" ItemsSource="{x:Bind ViewModel.DuplicateFiles}"> |
130 | | - <ItemsRepeater.Layout> |
131 | | - <StackLayout Orientation="Vertical"/> |
132 | | - </ItemsRepeater.Layout> |
133 | | - <ItemsRepeater.ItemTemplate> |
134 | | - <DataTemplate x:DataType="local:FileCompareViewModel"> |
135 | | - <Grid> |
136 | | - <Grid.RowDefinitions> |
137 | | - <RowDefinition Height="Auto"/> |
138 | | - <RowDefinition Height="Auto"/> |
139 | | - <RowDefinition Height="Auto"/> |
140 | | - </Grid.RowDefinitions> |
141 | | - <Grid.ColumnDefinitions> |
142 | | - <ColumnDefinition Width="*"/> |
143 | | - <ColumnDefinition Width="*"/> |
144 | | - </Grid.ColumnDefinitions> |
145 | | - |
146 | | - <StackPanel Grid.ColumnSpan="2" HorizontalAlignment="Left" CornerRadius="3"> |
147 | | - <StackPanel.Background> |
148 | | - <SolidColorBrush Color="{StaticResource DuplicateFilenameColor}" Opacity="{StaticResource DuplicateFilenameBackgroundOpacity}"/> |
149 | | - </StackPanel.Background> |
150 | | - <TextBlock Padding="4,0,4,4" Text="{x:Bind File1.Filename}" Foreground="{StaticResource DuplicateFilenameColor}"/> |
151 | | - </StackPanel> |
152 | | - <CheckBox Grid.Row="1" Margin="0,5,0,0" IsChecked="{x:Bind File1.Selected, Mode=TwoWay}"> |
153 | | - <StackPanel Orientation="Horizontal" Margin="11,0,0,0"> |
154 | | - <Image Source="{x:Bind File1.Bitmap}" Width="48" Height="48" Stretch="Uniform"/> |
155 | | - <StackPanel Margin="10,0,0,0" Orientation="Vertical"> |
156 | | - <TextBlock Text="{x:Bind File1.CreationDate,Converter={StaticResource DateTimeToStringConverter}}"/> |
157 | | - <TextBlock Text="{x:Bind File1.Bytes, Converter={StaticResource ReadableSizeConverter}}"/> |
158 | | - </StackPanel> |
| 130 | + <ScrollViewer Grid.Row="4" Margin="0,24,0,0"> |
| 131 | + <ItemsRepeater x:Load="False" Grid.Row="4" ItemsSource="{x:Bind ViewModel.DuplicateFiles}" x:Name="DuplicateFileItems"> |
| 132 | + <ItemsRepeater.Layout> |
| 133 | + <StackLayout Orientation="Vertical"/> |
| 134 | + </ItemsRepeater.Layout> |
| 135 | + <ItemsRepeater.ItemTemplate> |
| 136 | + <DataTemplate x:DataType="local:FileCompareViewModel"> |
| 137 | + <Grid> |
| 138 | + <Grid.RowDefinitions> |
| 139 | + <RowDefinition Height="Auto"/> |
| 140 | + <RowDefinition Height="Auto"/> |
| 141 | + <RowDefinition Height="Auto"/> |
| 142 | + </Grid.RowDefinitions> |
| 143 | + <Grid.ColumnDefinitions> |
| 144 | + <ColumnDefinition Width="*"/> |
| 145 | + <ColumnDefinition Width="*"/> |
| 146 | + </Grid.ColumnDefinitions> |
| 147 | + |
| 148 | + <StackPanel Grid.ColumnSpan="2" HorizontalAlignment="Left" CornerRadius="3"> |
| 149 | + <StackPanel.Background> |
| 150 | + <SolidColorBrush Color="{StaticResource DuplicateFilenameColor}" Opacity="{StaticResource DuplicateFilenameBackgroundOpacity}"/> |
| 151 | + </StackPanel.Background> |
| 152 | + <TextBlock Padding="4,0,4,4" Text="{x:Bind File1.Filename}" Foreground="{StaticResource DuplicateFilenameColor}"/> |
159 | 153 | </StackPanel> |
160 | | - </CheckBox> |
161 | | - |
162 | | - <CheckBox Grid.Row="1" Grid.Column="1" IsChecked="{x:Bind File2.Selected, Mode=TwoWay}"> |
163 | | - <StackPanel Orientation="Horizontal" Margin="11,0,0,0"> |
164 | | - <Image Source="{x:Bind File2.Bitmap}" Width="48" Height="48" Stretch="Uniform"/> |
165 | | - <StackPanel Margin="10,0,0,0" Orientation="Vertical"> |
166 | | - <TextBlock Text="{x:Bind File2.CreationDate, Converter={StaticResource DateTimeToStringConverter}}"/> |
167 | | - <TextBlock Text="{x:Bind File2.Bytes,Converter={StaticResource ReadableSizeConverter}}"/> |
| 154 | + <CheckBox Grid.Row="1" Margin="0,5,0,0" IsChecked="{x:Bind File1.Selected, Mode=TwoWay}"> |
| 155 | + <StackPanel Orientation="Horizontal" Margin="11,0,0,0"> |
| 156 | + <Image Source="{x:Bind File1.Bitmap}" Width="48" Height="48" Stretch="Uniform"/> |
| 157 | + <StackPanel Margin="10,0,0,0" Orientation="Vertical"> |
| 158 | + <TextBlock Text="{x:Bind File1.CreationDate,Converter={StaticResource DateTimeToStringConverter}}"/> |
| 159 | + <TextBlock Text="{x:Bind File1.Bytes, Converter={StaticResource ReadableSizeConverter}}"/> |
| 160 | + </StackPanel> |
168 | 161 | </StackPanel> |
169 | | - </StackPanel> |
170 | | - </CheckBox> |
171 | | - |
172 | | - <Line Margin="0,22,0,0" Grid.Row="2" Grid.ColumnSpan="2" X1="0" X2="500" Stroke="{StaticResource SeperatorLineColor}" Opacity="{StaticResource SeperatorLineOpacity}"/> |
173 | | - </Grid> |
174 | | - </DataTemplate> |
175 | | - </ItemsRepeater.ItemTemplate> |
176 | | - </ItemsRepeater> |
177 | | - |
178 | | - <Button x:Uid="ContinueButton" HorizontalAlignment="Right" Grid.Row="5" Style="{StaticResource AccentButtonStyle}" Loaded="Button_Loaded"/> |
| 162 | + </CheckBox> |
| 163 | + |
| 164 | + <CheckBox Grid.Row="1" Grid.Column="1" IsChecked="{x:Bind File2.Selected, Mode=TwoWay}"> |
| 165 | + <StackPanel Orientation="Horizontal" Margin="11,0,0,0"> |
| 166 | + <Image Source="{x:Bind File2.Bitmap}" Width="48" Height="48" Stretch="Uniform"/> |
| 167 | + <StackPanel Margin="10,0,0,0" Orientation="Vertical"> |
| 168 | + <TextBlock Text="{x:Bind File2.CreationDate, Converter={StaticResource DateTimeToStringConverter}}"/> |
| 169 | + <TextBlock Text="{x:Bind File2.Bytes,Converter={StaticResource ReadableSizeConverter}}"/> |
| 170 | + </StackPanel> |
| 171 | + </StackPanel> |
| 172 | + </CheckBox> |
| 173 | + |
| 174 | + <Line Margin="0,18,0,5" Grid.Row="2" Grid.ColumnSpan="2" X1="0" X2="500" Stroke="{StaticResource SeperatorLineColor}" Opacity="{StaticResource SeperatorLineOpacity}"/> |
| 175 | + </Grid> |
| 176 | + </DataTemplate> |
| 177 | + </ItemsRepeater.ItemTemplate> |
| 178 | + </ItemsRepeater> |
| 179 | + </ScrollViewer> |
| 180 | + |
| 181 | + <Button x:Load="False" |
| 182 | + x:Name="ContinueButton" |
| 183 | + x:Uid="ContinueButton" |
| 184 | + Margin="0,10,0,0" |
| 185 | + HorizontalAlignment="Right" |
| 186 | + Grid.Row="5" |
| 187 | + Style="{StaticResource AccentButtonStyle}" |
| 188 | + Loaded="Button_Loaded" |
| 189 | + Click="{x:Bind ViewModel.ConfirmDuplicates}" |
| 190 | + IsEnabled="{x:Bind ViewModel.CanContinue,Mode=OneWay}" |
| 191 | + /> |
179 | 192 | </Grid> |
180 | 193 | </Page> |
0 commit comments