|
23 | 23 |
|
24 | 24 | <ContentDialog.Resources>
|
25 | 25 | <ResourceDictionary>
|
26 |
| - <Style x:Key="GridSettingStyle" TargetType="Grid"> |
27 |
| - <Setter Property="Background" Value="{ThemeResource ExpanderHeaderBackground}" /> |
28 |
| - <Setter Property="BorderBrush" Value="{ThemeResource ExpanderHeaderBorderBrush}" /> |
29 |
| - <Setter Property="BorderThickness" Value="{ThemeResource ExpanderHeaderBorderThickness}" /> |
30 |
| - <Setter Property="HorizontalAlignment" Value="Stretch" /> |
31 |
| - <Setter Property="Padding" Value="-24,4,20,4" /> |
32 |
| - <Setter Property="MinHeight" Value="{StaticResource ExpanderMinHeight}" /> |
33 |
| - <Setter Property="CornerRadius" Value="{ThemeResource ControlCornerRadius}" /> |
34 |
| - </Style> |
35 |
| - |
36 | 26 | <ResourceDictionary.MergedDictionaries>
|
37 | 27 | <ResourceDictionary Source="/ResourceDictionaries/RightAlignedToggleSwitchStyle.xaml" />
|
38 | 28 | </ResourceDictionary.MergedDictionaries>
|
39 | 29 | </ResourceDictionary>
|
40 | 30 | </ContentDialog.Resources>
|
41 | 31 |
|
42 |
| - <StackPanel Padding="0,8,0,0" Spacing="24"> |
43 |
| - |
44 |
| - <Grid ColumnSpacing="8"> |
| 32 | + <StackPanel Width="440" Spacing="8"> |
| 33 | + <!-- Archive Name --> |
| 34 | + <Grid |
| 35 | + Padding="12" |
| 36 | + Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" |
| 37 | + BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
| 38 | + BorderThickness="1" |
| 39 | + ColumnSpacing="8" |
| 40 | + CornerRadius="4"> |
45 | 41 | <Grid.ColumnDefinitions>
|
46 | 42 | <ColumnDefinition Width="*" />
|
47 | 43 | <ColumnDefinition Width="Auto" />
|
48 | 44 | </Grid.ColumnDefinitions>
|
49 |
| - |
| 45 | + <TextBlock |
| 46 | + Grid.Column="0" |
| 47 | + VerticalAlignment="Center" |
| 48 | + Text="{helpers:ResourceString Name=ArchiveName}" /> |
50 | 49 | <TextBox
|
51 | 50 | x:Name="FileNameBox"
|
52 |
| - Width="340" |
53 |
| - VerticalAlignment="Bottom" |
54 |
| - Header="{helpers:ResourceString Name=ArchiveName}" |
| 51 | + Grid.Column="1" |
| 52 | + Width="260" |
55 | 53 | PlaceholderText="{helpers:ResourceString Name=EnterName}"
|
56 | 54 | Text="{x:Bind ViewModel.FileName, Mode=TwoWay}" />
|
| 55 | + </Grid> |
| 56 | + |
| 57 | + <!-- Archive Options --> |
| 58 | + <Grid |
| 59 | + Padding="12" |
| 60 | + Background="{ThemeResource CardBackgroundFillColorDefaultBrush}" |
| 61 | + BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}" |
| 62 | + BorderThickness="1" |
| 63 | + ColumnSpacing="8" |
| 64 | + CornerRadius="4" |
| 65 | + RowSpacing="12"> |
| 66 | + <Grid.ColumnDefinitions> |
| 67 | + <ColumnDefinition Width="*" /> |
| 68 | + <ColumnDefinition Width="Auto" /> |
| 69 | + </Grid.ColumnDefinitions> |
| 70 | + <Grid.RowDefinitions> |
| 71 | + <RowDefinition Height="Auto" /> |
| 72 | + <RowDefinition Height="Auto" /> |
| 73 | + <RowDefinition Height="Auto" /> |
| 74 | + </Grid.RowDefinitions> |
| 75 | + |
| 76 | + <!-- Archive Format --> |
| 77 | + <TextBlock |
| 78 | + Grid.Row="0" |
| 79 | + Grid.Column="0" |
| 80 | + VerticalAlignment="Center" |
| 81 | + Text="{helpers:ResourceString Name=Format}" /> |
57 | 82 | <ComboBox
|
58 | 83 | x:Name="FileFormatSelector"
|
| 84 | + Grid.Row="0" |
59 | 85 | Grid.Column="1"
|
60 |
| - MinWidth="100" |
61 |
| - VerticalAlignment="Bottom" |
| 86 | + Width="140" |
62 | 87 | ItemsSource="{x:Bind ViewModel.FileFormats}"
|
63 | 88 | SelectedItem="{x:Bind ViewModel.FileFormat, Mode=TwoWay}"
|
64 | 89 | SelectedValuePath="Key">
|
65 | 90 | <ComboBox.ItemTemplate>
|
66 | 91 | <DataTemplate>
|
67 |
| - <Grid ColumnSpacing="24"> |
68 |
| - <Grid.ColumnDefinitions> |
69 |
| - <ColumnDefinition Width="Auto" /> |
70 |
| - <ColumnDefinition Width="*" /> |
71 |
| - </Grid.ColumnDefinitions> |
72 |
| - <TextBlock Text="{Binding Label}" /> |
73 |
| - <TextBlock |
74 |
| - Grid.Column="1" |
75 |
| - VerticalAlignment="Bottom" |
76 |
| - FontSize="12" |
77 |
| - FontWeight="Light" |
78 |
| - Text="{Binding Description}" |
79 |
| - TextWrapping="Wrap" |
80 |
| - Visibility="{Binding IsDropDownOpen, ElementName=FileFormatSelector}" /> |
81 |
| - </Grid> |
| 92 | + <TextBlock Text="{Binding Label}" /> |
82 | 93 | </DataTemplate>
|
83 | 94 | </ComboBox.ItemTemplate>
|
84 | 95 | </ComboBox>
|
| 96 | + |
| 97 | + <!-- Compression Level --> |
| 98 | + <TextBlock |
| 99 | + Grid.Row="1" |
| 100 | + Grid.Column="0" |
| 101 | + VerticalAlignment="Center" |
| 102 | + Text="{helpers:ResourceString Name=CompressionLevel}" /> |
| 103 | + <ComboBox |
| 104 | + x:Name="CompressionLevelSelector" |
| 105 | + Grid.Row="1" |
| 106 | + Grid.Column="1" |
| 107 | + Width="140" |
| 108 | + HorizontalAlignment="Right" |
| 109 | + DisplayMemberPath="Label" |
| 110 | + ItemsSource="{x:Bind ViewModel.CompressionLevels}" |
| 111 | + SelectedItem="{x:Bind ViewModel.CompressionLevel, Mode=TwoWay}" |
| 112 | + SelectedValuePath="Key" /> |
| 113 | + |
| 114 | + <!-- Splitting Size --> |
| 115 | + <TextBlock |
| 116 | + Grid.Row="2" |
| 117 | + Grid.Column="0" |
| 118 | + VerticalAlignment="Center" |
| 119 | + Text="{helpers:ResourceString Name=SplittingSize}" /> |
| 120 | + <ComboBox |
| 121 | + x:Name="SplittingSizeSelector" |
| 122 | + Grid.Row="2" |
| 123 | + Grid.Column="1" |
| 124 | + Width="140" |
| 125 | + HorizontalAlignment="Right" |
| 126 | + DisplayMemberPath="Label" |
| 127 | + IsEnabled="{x:Bind ViewModel.CanSplit, Mode=OneWay}" |
| 128 | + ItemsSource="{x:Bind ViewModel.SplittingSizes}" |
| 129 | + SelectedItem="{x:Bind ViewModel.SplittingSize, Mode=TwoWay}" |
| 130 | + SelectedValuePath="Key" /> |
85 | 131 | </Grid>
|
86 | 132 |
|
87 |
| - <StackPanel Spacing="4"> |
88 |
| - <Grid Style="{StaticResource GridSettingStyle}"> |
89 |
| - <settings:SettingsDisplayControl Title="{helpers:ResourceString Name=CompressionLevel}" HorizontalAlignment="Stretch"> |
90 |
| - <ComboBox |
91 |
| - x:Name="CompressionLevelSelector" |
92 |
| - HorizontalAlignment="Right" |
93 |
| - DisplayMemberPath="Label" |
94 |
| - ItemsSource="{x:Bind ViewModel.CompressionLevels}" |
95 |
| - SelectedItem="{x:Bind ViewModel.CompressionLevel, Mode=TwoWay}" |
96 |
| - SelectedValuePath="Key" /> |
97 |
| - </settings:SettingsDisplayControl> |
98 |
| - </Grid> |
99 |
| - <Grid |
100 |
| - x:Name="SplittingSizeLayout" |
101 |
| - x:Load="{x:Bind ViewModel.CanSplit, Mode=OneWay}" |
102 |
| - Style="{StaticResource GridSettingStyle}"> |
103 |
| - <settings:SettingsDisplayControl Title="{helpers:ResourceString Name=SplittingSize}" HorizontalAlignment="Stretch"> |
104 |
| - <ComboBox |
105 |
| - x:Name="SplittingSizeSelector" |
106 |
| - HorizontalAlignment="Right" |
107 |
| - DisplayMemberPath="Label" |
108 |
| - ItemsSource="{x:Bind ViewModel.SplittingSizes}" |
109 |
| - SelectedItem="{x:Bind ViewModel.SplittingSize, Mode=TwoWay}" |
110 |
| - SelectedValuePath="Key" /> |
111 |
| - </settings:SettingsDisplayControl> |
112 |
| - </Grid> |
113 |
| - <StackPanel> |
114 |
| - <Grid Style="{StaticResource GridSettingStyle}"> |
115 |
| - <settings:SettingsDisplayControl |
116 |
| - Title="{helpers:ResourceString Name=Encryption}" |
117 |
| - Padding="-24,4,20,4" |
118 |
| - HorizontalAlignment="Stretch"> |
119 |
| - <ToggleSwitch |
120 |
| - x:Name="EncryptionSwitch" |
121 |
| - HorizontalAlignment="Right" |
122 |
| - IsOn="{x:Bind ViewModel.UseEncryption, Mode=TwoWay}" |
123 |
| - Style="{StaticResource RightAlignedToggleSwitchStyle}" /> |
124 |
| - </settings:SettingsDisplayControl> |
125 |
| - </Grid> |
126 |
| - <Grid |
127 |
| - x:Name="PasswordLayout" |
128 |
| - HorizontalAlignment="Stretch" |
129 |
| - x:Load="{x:Bind ViewModel.UseEncryption, Mode=OneWay}" |
130 |
| - Background="{StaticResource ExpanderDropDownBackground}" |
131 |
| - BorderBrush="{StaticResource ExpanderDropDownBorderBrush}" |
132 |
| - BorderThickness="{StaticResource ExpanderDropdownDownBorderThickness}" |
133 |
| - CornerRadius="{StaticResource ControlCornerRadius}"> |
| 133 | + <!-- Encryption Options --> |
| 134 | + <Expander HorizontalAlignment="Stretch" Header="{helpers:ResourceString Name=Encryption}"> |
| 135 | + <Expander.Content> |
| 136 | + <Grid Width="400"> |
134 | 137 | <Grid.ColumnDefinitions>
|
135 |
| - <ColumnDefinition Width="Auto" /> |
136 | 138 | <ColumnDefinition Width="*" />
|
| 139 | + <ColumnDefinition Width="Auto" /> |
137 | 140 | </Grid.ColumnDefinitions>
|
138 | 141 | <TextBlock
|
139 |
| - Margin="36,0,0,0" |
| 142 | + Grid.Column="0" |
140 | 143 | VerticalAlignment="Center"
|
141 | 144 | Text="{helpers:ResourceString Name=Password}" />
|
142 | 145 | <PasswordBox
|
143 | 146 | x:Name="PasswordBox"
|
144 | 147 | Grid.Column="1"
|
145 |
| - MinWidth="160" |
146 |
| - MaxWidth="280" |
147 |
| - Margin="16,8" |
148 |
| - HorizontalAlignment="Right" |
| 148 | + Width="260" |
149 | 149 | IsPasswordRevealButtonEnabled="True"
|
150 | 150 | Loading="PasswordBox_Loading"
|
151 | 151 | Password="{x:Bind ViewModel.Password, Mode=TwoWay}"
|
152 | 152 | PasswordRevealMode="Peek"
|
153 | 153 | PlaceholderText="{helpers:ResourceString Name=Password}" />
|
154 | 154 | </Grid>
|
155 |
| - </StackPanel> |
156 |
| - </StackPanel> |
157 |
| - |
| 155 | + </Expander.Content> |
| 156 | + </Expander> |
158 | 157 | </StackPanel>
|
159 | 158 |
|
160 | 159 | </ContentDialog>
|
0 commit comments