fix: 扫描时界面会因为文件名不同而抖动的问题
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
<UserControl xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:GUI.ViewModels"
|
||||
xmlns:converters="using:GUI.Converters"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d"
|
||||
@@ -10,8 +11,13 @@
|
||||
<vm:ScanProgressViewModel/>
|
||||
</Design.DataContext>
|
||||
|
||||
<UserControl.Resources>
|
||||
<converters:HalfDoubleConverter x:Key="HalfDouble"/>
|
||||
<converters:MiddleTruncateConverter x:Key="MiddleTruncate"/>
|
||||
</UserControl.Resources>
|
||||
|
||||
<Border Padding="16" Background="{DynamicResource SystemBaseLowColorBrush}" CornerRadius="8"
|
||||
MaxWidth="400">
|
||||
Width="{Binding $parent[Window].Width, Converter={StaticResource HalfDouble}}">
|
||||
<StackPanel Spacing="8">
|
||||
<TextBlock Text="{Binding StatusText}" FontWeight="SemiBold" FontSize="13" TextWrapping="Wrap"/>
|
||||
<ProgressBar Minimum="0" Maximum="100" Value="{Binding Progress}" Height="8"/>
|
||||
@@ -27,8 +33,8 @@
|
||||
<TextBlock Text="{Binding SkippedFiles, StringFormat='跳过: {0}'}" FontSize="11"
|
||||
Foreground="{DynamicResource SystemBaseMediumColorBrush}"/>
|
||||
</StackPanel>
|
||||
<TextBlock Text="{Binding CurrentFile}" FontSize="11"
|
||||
TextTrimming="CharacterEllipsis" MaxWidth="368"/>
|
||||
<TextBlock Text="{Binding CurrentFile, Converter={StaticResource MiddleTruncate}, ConverterParameter=60}"
|
||||
FontSize="11"/>
|
||||
<Button Content="关闭" Command="{Binding DismissCommand}"
|
||||
IsVisible="{Binding HasError}" HorizontalAlignment="Right"/>
|
||||
</StackPanel>
|
||||
|
||||
Reference in New Issue
Block a user