|
7 | 7 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
8 | 8 | xmlns:dataitems="using:Files.App.Data.Items" |
9 | 9 | xmlns:helpers="using:Files.App.Helpers" |
10 | | - xmlns:local="using:Files.App.UserControls.Settings" |
11 | 10 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
12 | 11 | xmlns:vm="using:Files.App.ViewModels.Settings" |
| 12 | + xmlns:wctcontrols="using:CommunityToolkit.WinUI.Controls" |
13 | 13 | mc:Ignorable="d"> |
14 | 14 |
|
15 | 15 | <Page.DataContext> |
|
30 | 30 | Text="{helpers:ResourceString Name=About}" /> |
31 | 31 |
|
32 | 32 | <!-- App Info --> |
33 | | - <local:SettingsBlockControl |
34 | | - Title="{x:Bind ViewModel.AppName}" |
| 33 | + <wctcontrols:SettingsCard |
35 | 34 | HorizontalAlignment="Stretch" |
36 | | - Description="{x:Bind ViewModel.Version}"> |
37 | | - <local:SettingsBlockControl.Icon> |
| 35 | + Description="{x:Bind ViewModel.Version}" |
| 36 | + Header="{x:Bind ViewModel.AppName}"> |
| 37 | + <wctcontrols:SettingsCard.HeaderIcon> |
38 | 38 | <FontIcon Glyph="" /> |
39 | | - </local:SettingsBlockControl.Icon> |
| 39 | + </wctcontrols:SettingsCard.HeaderIcon> |
40 | 40 | <Button x:Name="CopyVersionInfo" Content="{helpers:ResourceString Name=Copy}"> |
41 | 41 | <Button.Flyout> |
42 | 42 | <MenuFlyout> |
|
46 | 46 | </MenuFlyout> |
47 | 47 | </Button.Flyout> |
48 | 48 | </Button> |
49 | | - </local:SettingsBlockControl> |
| 49 | + </wctcontrols:SettingsCard> |
50 | 50 |
|
51 | 51 | <!-- GitHub Sponsor --> |
52 | | - <local:SettingsBlockControl |
53 | | - Title="{helpers:ResourceString Name=SponsorUsOnGitHub}" |
54 | | - ButtonCommand="{x:Bind ViewModel.SupportUsCommand}" |
55 | | - IsClickable="True"> |
56 | | - <local:SettingsBlockControl.Icon> |
| 52 | + <wctcontrols:SettingsCard |
| 53 | + Command="{x:Bind ViewModel.SupportUsCommand}" |
| 54 | + Header="{helpers:ResourceString Name=SponsorUsOnGitHub}" |
| 55 | + IsClickEnabled="True"> |
| 56 | + <wctcontrols:SettingsCard.HeaderIcon> |
57 | 57 | <FontIcon Glyph="" /> |
58 | | - </local:SettingsBlockControl.Icon> |
| 58 | + </wctcontrols:SettingsCard.HeaderIcon> |
59 | 59 |
|
60 | | - <FontIcon |
61 | | - FontSize="14" |
62 | | - Foreground="{ThemeResource TextFillColorPrimaryBrush}" |
63 | | - Glyph="" /> |
64 | | - </local:SettingsBlockControl> |
| 60 | + <wctcontrols:SettingsCard.ActionIcon> |
| 61 | + <FontIcon Glyph="" /> |
| 62 | + </wctcontrols:SettingsCard.ActionIcon> |
| 63 | + </wctcontrols:SettingsCard> |
65 | 64 |
|
66 | 65 |
|
67 | 66 | <!-- Help and support --> |
|
72 | 71 | Text="{helpers:ResourceString Name=HelpAndSupport}" /> |
73 | 72 |
|
74 | 73 | <!-- Documentation --> |
75 | | - <local:SettingsBlockControl |
76 | | - Title="{helpers:ResourceString Name=Documentation}" |
| 74 | + <wctcontrols:SettingsCard |
77 | 75 | HorizontalAlignment="Stretch" |
78 | | - ButtonCommand="{x:Bind ViewModel.OpenDocumentationCommand}" |
79 | | - IsClickable="True"> |
80 | | - <local:SettingsBlockControl.Icon> |
| 76 | + Command="{x:Bind ViewModel.OpenDocumentationCommand}" |
| 77 | + Header="{helpers:ResourceString Name=Documentation}" |
| 78 | + IsClickEnabled="True"> |
| 79 | + <wctcontrols:SettingsCard.HeaderIcon> |
81 | 80 | <FontIcon Glyph="" /> |
82 | | - </local:SettingsBlockControl.Icon> |
| 81 | + </wctcontrols:SettingsCard.HeaderIcon> |
83 | 82 |
|
84 | | - <FontIcon |
85 | | - FontSize="14" |
86 | | - Foreground="{ThemeResource TextFillColorPrimaryBrush}" |
87 | | - Glyph="" /> |
88 | | - </local:SettingsBlockControl> |
| 83 | + <wctcontrols:SettingsCard.ActionIcon> |
| 84 | + <FontIcon Glyph="" /> |
| 85 | + </wctcontrols:SettingsCard.ActionIcon> |
| 86 | + </wctcontrols:SettingsCard> |
89 | 87 |
|
90 | 88 | <!-- Questions & discussions --> |
91 | | - <local:SettingsBlockControl |
92 | | - Title="{helpers:ResourceString Name=QuestionsAndDiscussions}" |
| 89 | + <wctcontrols:SettingsCard |
93 | 90 | HorizontalAlignment="Stretch" |
94 | | - ButtonCommand="{x:Bind ViewModel.OpenDiscordCommand}" |
95 | | - IsClickable="True"> |
96 | | - <local:SettingsBlockControl.Icon> |
| 91 | + Command="{x:Bind ViewModel.OpenDiscordCommand}" |
| 92 | + Header="{helpers:ResourceString Name=QuestionsAndDiscussions}" |
| 93 | + IsClickEnabled="True"> |
| 94 | + <wctcontrols:SettingsCard.HeaderIcon> |
97 | 95 | <FontIcon Glyph="" /> |
98 | | - </local:SettingsBlockControl.Icon> |
| 96 | + </wctcontrols:SettingsCard.HeaderIcon> |
99 | 97 |
|
100 | | - <FontIcon |
101 | | - FontSize="14" |
102 | | - Foreground="{ThemeResource TextFillColorPrimaryBrush}" |
103 | | - Glyph="" /> |
104 | | - </local:SettingsBlockControl> |
| 98 | + <wctcontrols:SettingsCard.ActionIcon> |
| 99 | + <FontIcon Glyph="" /> |
| 100 | + </wctcontrols:SettingsCard.ActionIcon> |
| 101 | + </wctcontrols:SettingsCard> |
105 | 102 |
|
106 | 103 | <!-- Feedback --> |
107 | | - <local:SettingsBlockControl Title="{helpers:ResourceString Name=Feedback}" HorizontalAlignment="Stretch"> |
108 | | - <local:SettingsBlockControl.Icon> |
| 104 | + <wctcontrols:SettingsExpander HorizontalAlignment="Stretch" Header="{helpers:ResourceString Name=Feedback}"> |
| 105 | + <wctcontrols:SettingsExpander.HeaderIcon> |
109 | 106 | <FontIcon Glyph="" /> |
110 | | - </local:SettingsBlockControl.Icon> |
111 | | - <local:SettingsBlockControl.ExpandableContent> |
112 | | - <StackPanel> |
113 | | - <!-- Submit feature request --> |
114 | | - <local:SettingsBlockControl |
115 | | - Title="{helpers:ResourceString Name=SubmitFeatureRequest}" |
116 | | - HorizontalAlignment="Stretch" |
117 | | - ButtonCommand="{x:Bind ViewModel.SubmitFeatureRequestCommand}" |
118 | | - IsClickable="True"> |
119 | | - <FontIcon |
120 | | - FontSize="14" |
121 | | - Foreground="{ThemeResource TextFillColorPrimaryBrush}" |
122 | | - Glyph="" /> |
123 | | - </local:SettingsBlockControl> |
124 | | - |
125 | | - <!-- Submit bug report --> |
126 | | - <local:SettingsBlockControl |
127 | | - Title="{helpers:ResourceString Name=SubmitBugReport}" |
128 | | - HorizontalAlignment="Stretch" |
129 | | - ButtonCommand="{x:Bind ViewModel.SubmitBugReportCommand}" |
130 | | - IsClickable="True"> |
131 | | - <FontIcon |
132 | | - FontSize="14" |
133 | | - Foreground="{ThemeResource TextFillColorPrimaryBrush}" |
134 | | - Glyph="" /> |
135 | | - </local:SettingsBlockControl> |
136 | | - </StackPanel> |
137 | | - </local:SettingsBlockControl.ExpandableContent> |
138 | | - </local:SettingsBlockControl> |
| 107 | + </wctcontrols:SettingsExpander.HeaderIcon> |
| 108 | + <wctcontrols:SettingsExpander.Items> |
| 109 | + <!-- Submit feature request --> |
| 110 | + <wctcontrols:SettingsCard |
| 111 | + HorizontalAlignment="Stretch" |
| 112 | + Command="{x:Bind ViewModel.SubmitFeatureRequestCommand}" |
| 113 | + Header="{helpers:ResourceString Name=SubmitFeatureRequest}" |
| 114 | + IsClickEnabled="True"> |
| 115 | + <wctcontrols:SettingsCard.ActionIcon> |
| 116 | + <FontIcon Glyph="" /> |
| 117 | + </wctcontrols:SettingsCard.ActionIcon> |
| 118 | + </wctcontrols:SettingsCard> |
| 119 | + |
| 120 | + <!-- Submit bug report --> |
| 121 | + <wctcontrols:SettingsCard |
| 122 | + HorizontalAlignment="Stretch" |
| 123 | + Command="{x:Bind ViewModel.SubmitBugReportCommand}" |
| 124 | + Header="{helpers:ResourceString Name=SubmitBugReport}" |
| 125 | + IsClickEnabled="True"> |
| 126 | + <wctcontrols:SettingsCard.ActionIcon> |
| 127 | + <FontIcon Glyph="" /> |
| 128 | + </wctcontrols:SettingsCard.ActionIcon> |
| 129 | + </wctcontrols:SettingsCard> |
| 130 | + </wctcontrols:SettingsExpander.Items> |
| 131 | + </wctcontrols:SettingsExpander> |
139 | 132 |
|
140 | 133 | <!-- Open Log File Location --> |
141 | | - <local:SettingsBlockControl |
142 | | - Title="{helpers:ResourceString Name=OpenLogLocation}" |
| 134 | + <wctcontrols:SettingsCard |
143 | 135 | HorizontalAlignment="Stretch" |
144 | | - ButtonCommand="{x:Bind ViewModel.OpenLogLocationCommand}" |
145 | | - IsClickable="True"> |
146 | | - <local:SettingsBlockControl.Icon> |
| 136 | + Command="{x:Bind ViewModel.OpenLogLocationCommand}" |
| 137 | + Header="{helpers:ResourceString Name=OpenLogLocation}" |
| 138 | + IsClickEnabled="True"> |
| 139 | + <wctcontrols:SettingsCard.HeaderIcon> |
147 | 140 | <FontIcon Glyph="" /> |
148 | | - </local:SettingsBlockControl.Icon> |
| 141 | + </wctcontrols:SettingsCard.HeaderIcon> |
149 | 142 |
|
150 | | - <FontIcon |
151 | | - FontSize="14" |
152 | | - Foreground="{ThemeResource TextFillColorPrimaryBrush}" |
153 | | - Glyph="" /> |
154 | | - </local:SettingsBlockControl> |
| 143 | + <wctcontrols:SettingsCard.ActionIcon> |
| 144 | + <FontIcon Glyph="" /> |
| 145 | + </wctcontrols:SettingsCard.ActionIcon> |
| 146 | + </wctcontrols:SettingsCard> |
155 | 147 |
|
156 | 148 |
|
157 | 149 | <!-- Open Source --> |
|
162 | 154 | Text="{helpers:ResourceString Name=OpenSource}" /> |
163 | 155 |
|
164 | 156 | <!-- Translate --> |
165 | | - <local:SettingsBlockControl |
166 | | - Title="{helpers:ResourceString Name=ImproveTranslation}" |
| 157 | + <wctcontrols:SettingsCard |
167 | 158 | HorizontalAlignment="Stretch" |
168 | | - ButtonCommand="{x:Bind ViewModel.OpenCrowdinCommand}" |
169 | | - IsClickable="True"> |
170 | | - <local:SettingsBlockControl.Icon> |
| 159 | + Command="{x:Bind ViewModel.OpenCrowdinCommand}" |
| 160 | + Header="{helpers:ResourceString Name=ImproveTranslation}" |
| 161 | + IsClickEnabled="True"> |
| 162 | + <wctcontrols:SettingsCard.HeaderIcon> |
171 | 163 | <FontIcon Glyph="" /> |
172 | | - </local:SettingsBlockControl.Icon> |
| 164 | + </wctcontrols:SettingsCard.HeaderIcon> |
173 | 165 |
|
174 | | - <FontIcon |
175 | | - FontSize="14" |
176 | | - Foreground="{ThemeResource TextFillColorPrimaryBrush}" |
177 | | - Glyph="" /> |
178 | | - </local:SettingsBlockControl> |
| 166 | + <wctcontrols:SettingsCard.ActionIcon> |
| 167 | + <FontIcon Glyph="" /> |
| 168 | + </wctcontrols:SettingsCard.ActionIcon> |
| 169 | + </wctcontrols:SettingsCard> |
179 | 170 |
|
180 | 171 | <!-- Third Party Licenses --> |
181 | | - <local:SettingsBlockControl Title="{helpers:ResourceString Name=ThirdPartyLibraries}"> |
182 | | - <local:SettingsBlockControl.Icon> |
| 172 | + <wctcontrols:SettingsExpander Header="{helpers:ResourceString Name=ThirdPartyLibraries}"> |
| 173 | + <wctcontrols:SettingsExpander.HeaderIcon> |
183 | 174 | <FontIcon Glyph="" /> |
184 | | - </local:SettingsBlockControl.Icon> |
185 | | - <local:SettingsBlockControl.ExpandableContent> |
186 | | - <ItemsRepeater Margin="54,12,12,12" ItemsSource="{x:Bind ViewModel.OpenSourceLibraries, Mode=OneWay}"> |
187 | | - <ItemsRepeater.ItemTemplate> |
188 | | - <DataTemplate x:DataType="dataitems:OpenSourceLibraryItem"> |
189 | | - <TextBlock Margin="4,0" VerticalAlignment="Center"> |
| 175 | + </wctcontrols:SettingsExpander.HeaderIcon> |
| 176 | + <wctcontrols:SettingsExpander.Items> |
| 177 | + <wctcontrols:SettingsCard> |
| 178 | + <ItemsRepeater Margin="0,12,0,12" ItemsSource="{x:Bind ViewModel.OpenSourceLibraries, Mode=OneWay}"> |
| 179 | + <ItemsRepeater.ItemTemplate> |
| 180 | + <DataTemplate x:DataType="dataitems:OpenSourceLibraryItem"> |
| 181 | + <TextBlock Margin="4,0" VerticalAlignment="Center"> |
190 | 182 | <Hyperlink NavigateUri="{x:Bind Url}" UnderlineStyle="None"> |
191 | 183 | <Run Text="{x:Bind Name}" /> |
192 | 184 | </Hyperlink> |
193 | | - </TextBlock> |
194 | | - </DataTemplate> |
195 | | - </ItemsRepeater.ItemTemplate> |
196 | | - <ItemsRepeater.Layout> |
197 | | - <UniformGridLayout |
| 185 | + </TextBlock> |
| 186 | + </DataTemplate> |
| 187 | + </ItemsRepeater.ItemTemplate> |
| 188 | + <ItemsRepeater.Layout> |
| 189 | + <UniformGridLayout |
198 | 190 | ItemsStretch="Fill" |
199 | 191 | MaximumRowsOrColumns="6" |
200 | 192 | MinColumnSpacing="8" |
201 | 193 | MinItemWidth="200" |
202 | 194 | MinRowSpacing="8" |
203 | 195 | Orientation="Horizontal" /> |
204 | | - </ItemsRepeater.Layout> |
205 | | - </ItemsRepeater> |
206 | | - </local:SettingsBlockControl.ExpandableContent> |
207 | | - </local:SettingsBlockControl> |
| 196 | + </ItemsRepeater.Layout> |
| 197 | + </ItemsRepeater> |
| 198 | + </wctcontrols:SettingsCard> |
| 199 | + </wctcontrols:SettingsExpander.Items> |
| 200 | + </wctcontrols:SettingsExpander> |
208 | 201 |
|
209 | 202 | <!-- Open GitHub repo --> |
210 | | - <local:SettingsBlockControl |
211 | | - Title="{helpers:ResourceString Name=OpenGitHubRepo}" |
| 203 | + <wctcontrols:SettingsCard |
212 | 204 | HorizontalAlignment="Stretch" |
213 | | - ButtonCommand="{x:Bind ViewModel.OpenGitHubRepoCommand}" |
214 | | - IsClickable="True"> |
215 | | - <local:SettingsBlockControl.Icon> |
| 205 | + Command="{x:Bind ViewModel.OpenGitHubRepoCommand}" |
| 206 | + Header="{helpers:ResourceString Name=OpenGitHubRepo}" |
| 207 | + IsClickEnabled="True"> |
| 208 | + <wctcontrols:SettingsCard.HeaderIcon> |
216 | 209 | <FontIcon Glyph="" /> |
217 | | - </local:SettingsBlockControl.Icon> |
| 210 | + </wctcontrols:SettingsCard.HeaderIcon> |
218 | 211 |
|
219 | | - <FontIcon |
220 | | - FontSize="14" |
221 | | - Foreground="{ThemeResource TextFillColorPrimaryBrush}" |
222 | | - Glyph="" /> |
223 | | - </local:SettingsBlockControl> |
| 212 | + <wctcontrols:SettingsCard.ActionIcon> |
| 213 | + <FontIcon Glyph="" /> |
| 214 | + </wctcontrols:SettingsCard.ActionIcon> |
| 215 | + </wctcontrols:SettingsCard> |
224 | 216 |
|
225 | 217 | <!-- Privacy --> |
226 | | - <local:SettingsBlockControl |
227 | | - Title="{helpers:ResourceString Name=Privacy}" |
| 218 | + <wctcontrols:SettingsCard |
228 | 219 | HorizontalAlignment="Stretch" |
229 | | - ButtonCommand="{x:Bind ViewModel.OpenPrivacyPolicyCommand}" |
230 | | - IsClickable="True"> |
231 | | - <local:SettingsBlockControl.Icon> |
| 220 | + Command="{x:Bind ViewModel.OpenPrivacyPolicyCommand}" |
| 221 | + Header="{helpers:ResourceString Name=Privacy}" |
| 222 | + IsClickEnabled="True"> |
| 223 | + <wctcontrols:SettingsCard.HeaderIcon> |
232 | 224 | <FontIcon Glyph="" /> |
233 | | - </local:SettingsBlockControl.Icon> |
| 225 | + </wctcontrols:SettingsCard.HeaderIcon> |
234 | 226 |
|
235 | | - <FontIcon |
236 | | - FontSize="14" |
237 | | - Foreground="{ThemeResource TextFillColorPrimaryBrush}" |
238 | | - Glyph="" /> |
239 | | - </local:SettingsBlockControl> |
| 227 | + <wctcontrols:SettingsCard.ActionIcon> |
| 228 | + <FontIcon Glyph="" /> |
| 229 | + </wctcontrols:SettingsCard.ActionIcon> |
| 230 | + </wctcontrols:SettingsCard> |
240 | 231 | </StackPanel> |
241 | 232 | </Grid> |
242 | 233 | </Page> |
0 commit comments