|
| 1 | +<ContentDialog |
| 2 | + x:Class="Files.App.Dialogs.CreateArchiveDialog" |
| 3 | + xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
| 4 | + xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
| 5 | + xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 6 | + xmlns:helpers="using:Files.App.Helpers" |
| 7 | + xmlns:local="using:Files.App.Dialogs" |
| 8 | + xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
| 9 | + Title="{helpers:ResourceString Name=CreateArchive}" |
| 10 | + d:DesignHeight="300" |
| 11 | + d:DesignWidth="400" |
| 12 | + CloseButtonText="{helpers:ResourceString Name=Cancel}" |
| 13 | + Closing="ContentDialog_Closing" |
| 14 | + CornerRadius="{StaticResource OverlayCornerRadius}" |
| 15 | + DefaultButton="Primary" |
| 16 | + IsPrimaryButtonEnabled="True" |
| 17 | + Loaded="ContentDialog_Loaded" |
| 18 | + PrimaryButtonText="{helpers:ResourceString Name=Create}" |
| 19 | + RequestedTheme="{x:Bind helpers:ThemeHelper.RootTheme}" |
| 20 | + Style="{StaticResource DefaultContentDialogStyle}" |
| 21 | + mc:Ignorable="d"> |
| 22 | + <StackPanel Width="440" Spacing="8"> |
| 23 | + |
| 24 | + <!-- Archive Name --> |
| 25 | + <Grid |
| 26 | + Padding="12" |
| 27 | + Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" |
| 28 | + BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
| 29 | + BorderThickness="1" |
| 30 | + ColumnSpacing="8" |
| 31 | + CornerRadius="4"> |
| 32 | + <Grid.ColumnDefinitions> |
| 33 | + <ColumnDefinition Width="*" /> |
| 34 | + <ColumnDefinition Width="Auto" /> |
| 35 | + </Grid.ColumnDefinitions> |
| 36 | + <TextBlock |
| 37 | + Grid.Column="0" |
| 38 | + VerticalAlignment="Center" |
| 39 | + Text="{helpers:ResourceString Name=Name}" /> |
| 40 | + <TextBox |
| 41 | + x:Name="FileNameBox" |
| 42 | + Grid.Column="1" |
| 43 | + Width="260" |
| 44 | + PlaceholderText="{helpers:ResourceString Name=EnterName}" |
| 45 | + Text="{x:Bind ViewModel.FileName, Mode=TwoWay}" /> |
| 46 | + </Grid> |
| 47 | + |
| 48 | + <!-- Archive Options --> |
| 49 | + <Grid |
| 50 | + Padding="12" |
| 51 | + Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" |
| 52 | + BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
| 53 | + BorderThickness="1" |
| 54 | + ColumnSpacing="8" |
| 55 | + CornerRadius="4" |
| 56 | + RowSpacing="12"> |
| 57 | + <Grid.ColumnDefinitions> |
| 58 | + <ColumnDefinition Width="*" /> |
| 59 | + <ColumnDefinition Width="Auto" /> |
| 60 | + </Grid.ColumnDefinitions> |
| 61 | + <Grid.RowDefinitions> |
| 62 | + <RowDefinition Height="Auto" /> |
| 63 | + <RowDefinition Height="Auto" /> |
| 64 | + <RowDefinition Height="Auto" /> |
| 65 | + </Grid.RowDefinitions> |
| 66 | + |
| 67 | + <!-- Archive Format --> |
| 68 | + <TextBlock |
| 69 | + Grid.Row="0" |
| 70 | + Grid.Column="0" |
| 71 | + VerticalAlignment="Center" |
| 72 | + Text="{helpers:ResourceString Name=Format}" /> |
| 73 | + <ComboBox |
| 74 | + x:Name="FileFormatSelector" |
| 75 | + Grid.Row="0" |
| 76 | + Grid.Column="1" |
| 77 | + Width="160" |
| 78 | + ItemsSource="{x:Bind ViewModel.FileFormats}" |
| 79 | + SelectedItem="{x:Bind ViewModel.FileFormat, Mode=TwoWay}" |
| 80 | + DisplayMemberPath="Label" |
| 81 | + SelectedValuePath="Key" /> |
| 82 | + |
| 83 | + <!-- Compression Level --> |
| 84 | + <TextBlock |
| 85 | + Grid.Row="1" |
| 86 | + Grid.Column="0" |
| 87 | + VerticalAlignment="Center" |
| 88 | + Text="{helpers:ResourceString Name=CompressionLevel}" /> |
| 89 | + <ComboBox |
| 90 | + x:Name="CompressionLevelSelector" |
| 91 | + Grid.Row="1" |
| 92 | + Grid.Column="1" |
| 93 | + Width="160" |
| 94 | + HorizontalAlignment="Right" |
| 95 | + DisplayMemberPath="Label" |
| 96 | + ItemsSource="{x:Bind ViewModel.CompressionLevels}" |
| 97 | + SelectedItem="{x:Bind ViewModel.CompressionLevel, Mode=TwoWay}" |
| 98 | + SelectedValuePath="Key" /> |
| 99 | + |
| 100 | + <!-- Splitting Size --> |
| 101 | + <TextBlock |
| 102 | + Grid.Row="2" |
| 103 | + Grid.Column="0" |
| 104 | + VerticalAlignment="Center" |
| 105 | + Text="{helpers:ResourceString Name=SplittingSize}" /> |
| 106 | + <ComboBox |
| 107 | + x:Name="SplittingSizeSelector" |
| 108 | + Grid.Row="2" |
| 109 | + Grid.Column="1" |
| 110 | + Width="160" |
| 111 | + HorizontalAlignment="Right" |
| 112 | + IsEnabled="{x:Bind ViewModel.CanSplit, Mode=OneWay}" |
| 113 | + ItemsSource="{x:Bind ViewModel.SplittingSizes}" |
| 114 | + SelectedItem="{x:Bind ViewModel.SplittingSize, Mode=TwoWay}" |
| 115 | + SelectedValuePath="Key"> |
| 116 | + <ComboBox.ItemTemplate> |
| 117 | + <DataTemplate x:DataType="local:SplittingSizeItem"> |
| 118 | + <StackPanel Orientation="Horizontal" Spacing="4"> |
| 119 | + <TextBlock Text="{x:Bind Label}" /> |
| 120 | + <TextBlock Text="{x:Bind Separator}" Visibility="{Binding IsDropDownOpen, ElementName=SplittingSizeSelector}" /> |
| 121 | + <TextBlock Text="{x:Bind Description}" Visibility="{Binding IsDropDownOpen, ElementName=SplittingSizeSelector}" /> |
| 122 | + </StackPanel> |
| 123 | + </DataTemplate> |
| 124 | + </ComboBox.ItemTemplate> |
| 125 | + </ComboBox> |
| 126 | + </Grid> |
| 127 | + |
| 128 | + <!-- Encryption Options --> |
| 129 | + <Expander |
| 130 | + HorizontalAlignment="Stretch" |
| 131 | + Header="{helpers:ResourceString Name=Encryption}" |
| 132 | + IsExpanded="{x:Bind ViewModel.UseEncryption, Mode=TwoWay}"> |
| 133 | + <Expander.Content> |
| 134 | + <Grid Width="400"> |
| 135 | + <Grid.ColumnDefinitions> |
| 136 | + <ColumnDefinition Width="*" /> |
| 137 | + <ColumnDefinition Width="Auto" /> |
| 138 | + </Grid.ColumnDefinitions> |
| 139 | + <TextBlock |
| 140 | + Grid.Column="0" |
| 141 | + VerticalAlignment="Center" |
| 142 | + Text="{helpers:ResourceString Name=Password}" /> |
| 143 | + <PasswordBox |
| 144 | + x:Name="PasswordBox" |
| 145 | + Grid.Column="1" |
| 146 | + Width="260" |
| 147 | + IsPasswordRevealButtonEnabled="True" |
| 148 | + Loading="PasswordBox_Loading" |
| 149 | + Password="{x:Bind ViewModel.Password, Mode=TwoWay}" |
| 150 | + PasswordRevealMode="Peek" |
| 151 | + PlaceholderText="{helpers:ResourceString Name=Password}" /> |
| 152 | + </Grid> |
| 153 | + </Expander.Content> |
| 154 | + </Expander> |
| 155 | + </StackPanel> |
| 156 | +</ContentDialog> |
0 commit comments