|
1 | | -<controls:UserControlBase xmlns="https://github.com/avaloniaui" |
2 | | - xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
3 | | - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
4 | | - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
5 | | - xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls" |
6 | | - xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages" |
7 | | - xmlns:dialogs="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Dialogs" |
8 | | - xmlns:controls1="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" |
9 | | - mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450" |
10 | | - x:DataType="dialogs:ConfirmPackageDeleteDialogViewModel" |
11 | | - x:Class="StabilityMatrix.Avalonia.Views.Dialogs.ConfirmPackageDeleteDialog"> |
12 | | - <Grid RowDefinitions="Auto, Auto, Auto, Auto, *" |
13 | | - Margin="8"> |
14 | | - <TextBlock Text="{x:Static lang:Resources.Text_PackageUninstall_Details}" |
15 | | - FontWeight="Bold" |
16 | | - FontSize="20" |
17 | | - TextAlignment="Center" |
18 | | - TextWrapping="Wrap"/> |
19 | | - <TextBlock Grid.Row="1" |
20 | | - Margin="0,32,0,8" |
21 | | - TextAlignment="Center"> |
22 | | - <Run Text="Please type"/> |
23 | | - <Run FontWeight="Bold" Text="{Binding ExpectedPackageName}"/> |
24 | | - <Run Text="to confirm the deletion of the package:"/> |
25 | | - </TextBlock> |
26 | | - |
27 | | - <TextBox Grid.Row="2" |
28 | | - Text="{Binding PackageName, Mode=TwoWay}" |
29 | | - Margin="0,16,0,0"/> |
30 | | - |
31 | | - <controls1:InfoBar Grid.Row="3" |
32 | | - Margin="0,16,0,0" |
33 | | - IsClosable="False" |
34 | | - IsOpen="True" |
35 | | - Title="{x:Static lang:Resources.Label_ActionCannotBeUndone}" |
36 | | - Severity="Warning"/> |
37 | | - |
38 | | - <UniformGrid Grid.Row="4" HorizontalAlignment="Stretch" |
39 | | - VerticalAlignment="Bottom" |
40 | | - Margin="0,32,0,0"> |
41 | | - <Button Content="{x:Static lang:Resources.Action_Delete}" |
42 | | - Classes="danger" |
43 | | - IsEnabled="{Binding IsValid}" |
44 | | - HorizontalAlignment="Stretch" |
45 | | - Margin="0,0,4,0" |
46 | | - Command="{Binding OnPrimaryButtonClick}" |
47 | | - FontSize="16"/> |
48 | | - <Button Content="{x:Static lang:Resources.Action_Cancel}" |
49 | | - Command="{Binding OnCloseButtonClick}" |
50 | | - Margin="4,0,0,0" |
51 | | - HorizontalAlignment="Stretch" |
52 | | - FontSize="16"/> |
| 1 | +<controls:UserControlBase |
| 2 | + x:Class="StabilityMatrix.Avalonia.Views.Dialogs.ConfirmPackageDeleteDialog" |
| 3 | + xmlns="https://github.com/avaloniaui" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:avalonia="https://github.com/projektanker/icons.avalonia" |
| 6 | + xmlns:controls="clr-namespace:StabilityMatrix.Avalonia.Controls" |
| 7 | + xmlns:controls1="clr-namespace:FluentAvalonia.UI.Controls;assembly=FluentAvalonia" |
| 8 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 9 | + xmlns:designData="clr-namespace:StabilityMatrix.Avalonia.DesignData" |
| 10 | + xmlns:dialogs="clr-namespace:StabilityMatrix.Avalonia.ViewModels.Dialogs" |
| 11 | + xmlns:lang="clr-namespace:StabilityMatrix.Avalonia.Languages" |
| 12 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 13 | + d:DataContext="{x:Static designData:DesignData.ConfirmPackageDeleteDialogViewModel}" |
| 14 | + d:DesignHeight="650" |
| 15 | + d:DesignWidth="800" |
| 16 | + x:DataType="dialogs:ConfirmPackageDeleteDialogViewModel" |
| 17 | + mc:Ignorable="d"> |
| 18 | + <Grid Margin="8" RowDefinitions="Auto, Auto, Auto, Auto, Auto, Auto, Auto, Auto, *"> |
| 19 | + <StackPanel |
| 20 | + Grid.Row="0" |
| 21 | + Margin="0,4,0,0" |
| 22 | + HorizontalAlignment="Center" |
| 23 | + Orientation="Horizontal"> |
| 24 | + <avalonia:Icon |
| 25 | + Margin="0,0,-4,0" |
| 26 | + FontSize="18" |
| 27 | + Value="fa-solid fa-wind"> |
| 28 | + <avalonia:Icon.RenderTransform> |
| 29 | + <ScaleTransform ScaleX="-1" /> |
| 30 | + </avalonia:Icon.RenderTransform> |
| 31 | + </avalonia:Icon> |
| 32 | + <avalonia:Icon FontSize="32" Value="fa-solid fa-dolly" /> |
| 33 | + </StackPanel> |
| 34 | + |
| 35 | + <TextBlock |
| 36 | + Grid.Row="1" |
| 37 | + Margin="0,4,0,0" |
| 38 | + FontSize="24" |
| 39 | + Text="{Binding ExpectedPackageName, StringFormat={}Delete {0}?}" |
| 40 | + TextAlignment="Center" /> |
| 41 | + |
| 42 | + <TextBlock |
| 43 | + Grid.Row="2" |
| 44 | + Margin="0,4,0,0" |
| 45 | + Foreground="{DynamicResource TextFillColorSecondaryBrush}" |
| 46 | + Text="{Binding Package.FullPath}" |
| 47 | + TextAlignment="Center" /> |
| 48 | + |
| 49 | + <controls1:InfoBar |
| 50 | + Title="{x:Static lang:Resources.Label_ActionCannotBeUndone}" |
| 51 | + Grid.Row="3" |
| 52 | + Margin="0,16,0,0" |
| 53 | + IsClosable="False" |
| 54 | + IsOpen="True" |
| 55 | + Severity="Warning" /> |
| 56 | + |
| 57 | + <TextBlock |
| 58 | + Grid.Row="4" |
| 59 | + Margin="0,16,0,8" |
| 60 | + VerticalAlignment="Center" |
| 61 | + FontSize="16" |
| 62 | + FontWeight="Bold" |
| 63 | + Foreground="{DynamicResource ThemeCoralRedColor}" |
| 64 | + Text="This will permanently delete the following:" |
| 65 | + TextWrapping="Wrap" /> |
| 66 | + |
| 67 | + <TextBlock |
| 68 | + Grid.Row="5" |
| 69 | + Margin="0,0,0,8" |
| 70 | + VerticalAlignment="Center" |
| 71 | + FontSize="16" |
| 72 | + Foreground="{DynamicResource TextFillColorSecondaryBrush}" |
| 73 | + Text="{Binding DeleteWarningText}" |
| 74 | + TextWrapping="Wrap" /> |
| 75 | + |
| 76 | + <StackPanel |
| 77 | + Grid.Row="6" |
| 78 | + Margin="0,32,0,4" |
| 79 | + HorizontalAlignment="Center" |
| 80 | + Orientation="Horizontal" |
| 81 | + Spacing="0"> |
| 82 | + <TextBlock |
| 83 | + FontSize="16" |
| 84 | + Text="To confirm, please type "" |
| 85 | + TextAlignment="Center" /> |
| 86 | + <TextBlock |
| 87 | + Cursor="Hand" |
| 88 | + FontSize="16" |
| 89 | + Text="{Binding ExpectedPackageName}" |
| 90 | + TextAlignment="Center" |
| 91 | + ToolTip.Tip="Click to copy"> |
| 92 | + <Interaction.Behaviors> |
| 93 | + <EventTriggerBehavior EventName="PointerPressed"> |
| 94 | + <InvokeCommandAction Command="{Binding CopyExpectedPackageNameCommand}" /> |
| 95 | + </EventTriggerBehavior> |
| 96 | + </Interaction.Behaviors> |
| 97 | + <TextBlock.Styles> |
| 98 | + <Style Selector="TextBlock:pointerover"> |
| 99 | + <Setter Property="Foreground" Value="{DynamicResource TextFillColorSecondaryBrush}" /> |
| 100 | + </Style> |
| 101 | + </TextBlock.Styles> |
| 102 | + </TextBlock> |
| 103 | + <TextBlock |
| 104 | + FontSize="16" |
| 105 | + Text="" in the box below:" |
| 106 | + TextAlignment="Center" /> |
| 107 | + </StackPanel> |
| 108 | + |
| 109 | + <TextBox |
| 110 | + Grid.Row="7" |
| 111 | + Margin="0,8,0,0" |
| 112 | + Text="{Binding PackageName, Mode=TwoWay}" /> |
| 113 | + |
| 114 | + <UniformGrid |
| 115 | + Grid.Row="8" |
| 116 | + Margin="0,32,0,0" |
| 117 | + HorizontalAlignment="Stretch" |
| 118 | + VerticalAlignment="Bottom"> |
| 119 | + <Button |
| 120 | + Margin="0,0,4,0" |
| 121 | + HorizontalAlignment="Stretch" |
| 122 | + Classes="danger" |
| 123 | + Command="{Binding OnPrimaryButtonClick}" |
| 124 | + Content="{x:Static lang:Resources.Action_Delete}" |
| 125 | + FontSize="16" |
| 126 | + IsEnabled="{Binding IsValid}" /> |
| 127 | + <Button |
| 128 | + Margin="4,0,0,0" |
| 129 | + HorizontalAlignment="Stretch" |
| 130 | + Command="{Binding OnCloseButtonClick}" |
| 131 | + Content="{x:Static lang:Resources.Action_Cancel}" |
| 132 | + FontSize="16" /> |
53 | 133 | </UniformGrid> |
54 | 134 | </Grid> |
55 | 135 | </controls:UserControlBase> |
0 commit comments