Skip to content

Commit a056d19

Browse files
committed
format xaml
1 parent 60b6ef0 commit a056d19

File tree

7 files changed

+340
-282
lines changed

7 files changed

+340
-282
lines changed

src/Notepads/Resource/CustomSettingsStyle.xaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
1-
<ResourceDictionary
2-
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4-
xmlns:local="using:Notepads">
1+
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
2+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3+
xmlns:local="using:Notepads">
54

6-
<!-- Common Control Properties -->
5+
<!-- Common Control Properties -->
76
<Thickness x:Key="SettingsPagePadding">20,0</Thickness>
87
<Thickness x:Key="SettingsPageFooterMargin">0,0,0,32</Thickness>
98

10-
<!-- Sections Spacing -->
9+
<Thickness x:Key="ComboBoxBorderThemeThickness">1</Thickness>
10+
11+
<!-- Brushes -->
12+
<StaticResource x:Key="ComboBoxBackground" ResourceKey="SystemControlTransparentBrush" />
13+
14+
<!-- Styles -->
1115
<Style x:Key="SettingsSectionStyle" TargetType="StackPanel">
1216
<Setter Property="Margin" Value="0,8" />
1317
</Style>
1418

15-
<!-- Text Styles -->
1619
<Style x:Key="CompactSubtitleTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource SubtitleTextBlockStyle}">
1720
<Setter Property="FontSize" Value="18" />
1821
<Setter Property="Margin" Value="0,0,0,10" />
1922
</Style>
20-
2123
<Style x:Key="DescriptionTextBlockStyle" TargetType="TextBlock" BasedOn="{StaticResource CaptionTextBlockStyle}">
2224
<Setter Property="Foreground" Value="{ThemeResource SystemControlDescriptionTextForegroundBrush}" />
2325
</Style>

src/Notepads/Views/Settings/AboutPage.xaml

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
<Page
2-
x:Class="Notepads.Views.Settings.AboutPage"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7-
mc:Ignorable="d">
1+
<Page x:Class="Notepads.Views.Settings.AboutPage"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
mc:Ignorable="d">
87

98
<Grid>
109
<Grid.ChildrenTransitions>
@@ -16,34 +15,36 @@
1615
<BrushTransition />
1716
</Grid.BackgroundTransition>
1817

19-
<ScrollViewer
20-
Grid.Row="0"
21-
Padding="{StaticResource SettingsPagePadding}"
22-
IsTabStop="False"
23-
UseSystemFocusVisuals="False"
24-
VerticalScrollBarVisibility="Auto"
25-
VerticalScrollMode="Auto">
18+
<ScrollViewer Grid.Row="0"
19+
Padding="{StaticResource SettingsPagePadding}"
20+
VerticalScrollBarVisibility="Auto"
21+
VerticalScrollMode="Auto"
22+
IsTabStop="False"
23+
UseSystemFocusVisuals="False">
2624
<StackPanel Margin="{StaticResource SettingsPageFooterMargin}" HorizontalAlignment="Left">
2725

2826
<!-- About -->
2927
<StackPanel Style="{StaticResource SettingsSectionStyle}" Orientation="Horizontal">
30-
<Image x:Name="AppIconImage" Width="90" Margin="-6,0,12,0" Source="/Assets/appicon_ws.png" />
28+
<Image x:Name="AppIconImage"
29+
Width="90"
30+
Margin="-6,0,12,0"
31+
Source="/Assets/appicon_ws.png" />
3132
<StackPanel>
32-
<TextBlock
33-
Margin="0,4"
34-
FontWeight="Normal"
35-
Style="{StaticResource TitleTextBlockStyle}"
36-
Text="{x:Bind AppName, Mode=OneTime}" />
37-
<TextBlock
38-
Foreground="{ThemeResource SystemControlDescriptionTextForegroundBrush}"
39-
Style="{StaticResource SubtitleTextBlockStyle}"
40-
Text="{x:Bind AppVersion, Mode=OneTime}" />
33+
<TextBlock Style="{StaticResource TitleTextBlockStyle}"
34+
Margin="0,4"
35+
FontWeight="Normal"
36+
Text="{x:Bind AppName, Mode=OneTime}" />
37+
<TextBlock Style="{StaticResource SubtitleTextBlockStyle}"
38+
Foreground="{ThemeResource SystemControlDescriptionTextForegroundBrush}"
39+
Text="{x:Bind AppVersion, Mode=OneTime}" />
4140
</StackPanel>
4241
</StackPanel>
4342

4443
<!-- Description & Related Links -->
4544
<StackPanel Style="{StaticResource SettingsSectionStyle}" Spacing="8">
46-
<TextBlock x:Uid="/Settings/AboutPage_NotepadsShortDescription" Margin="0,0,0,8" TextWrapping="Wrap" />
45+
<TextBlock x:Uid="/Settings/AboutPage_NotepadsShortDescription"
46+
Margin="0,0,0,8"
47+
TextWrapping="Wrap" />
4748
<StackPanel Spacing="-4">
4849
<TextBlock x:Uid="/Settings/AboutPage_Notepads_SourceCodeTitle" TextWrapping="Wrap" />
4950
<HyperlinkButton Content="https://github.com/0x7c13/Notepads" NavigateUri="https://github.com/0x7c13/Notepads" />
@@ -65,13 +66,17 @@
6566

6667
<!-- Changelog -->
6768
<StackPanel Style="{StaticResource SettingsSectionStyle}">
68-
<TextBlock x:Uid="/Settings/AboutPage_ChangelogUrl_Title" Margin="0,0,0,4" Style="{StaticResource CompactSubtitleTextBlockStyle}" />
69+
<TextBlock x:Uid="/Settings/AboutPage_ChangelogUrl_Title"
70+
Style="{StaticResource CompactSubtitleTextBlockStyle}"
71+
Margin="0,0,0,4" />
6972
<HyperlinkButton Content="Notepads Releases" NavigateUri="https://github.com/0x7c13/Notepads/releases" />
7073
</StackPanel>
7174

7275
<!-- Dependencies & References -->
7376
<StackPanel Style="{StaticResource SettingsSectionStyle}">
74-
<TextBlock x:Uid="/Settings/AboutPage_DependenciesAndReferences_Title" Margin="0,0,0,4" Style="{StaticResource CompactSubtitleTextBlockStyle}" />
77+
<TextBlock x:Uid="/Settings/AboutPage_DependenciesAndReferences_Title"
78+
Style="{StaticResource CompactSubtitleTextBlockStyle}"
79+
Margin="0,0,0,4" />
7580
<StackPanel Spacing="-4">
7681
<HyperlinkButton Content="Windows UI Library" NavigateUri="https://github.com/Microsoft/microsoft-ui-xaml" />
7782
<HyperlinkButton Content="Windows Community Toolkit" NavigateUri="https://github.com/windows-toolkit/WindowsCommunityToolkit" />

src/Notepads/Views/Settings/AdvancedSettingsPage.xaml

Lines changed: 39 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
1-
<Page
2-
x:Class="Notepads.Views.Settings.AdvancedSettingsPage"
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:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
7-
xmlns:utilities="using:Notepads.Utilities"
8-
mc:Ignorable="d">
1+
<Page x:Class="Notepads.Views.Settings.AdvancedSettingsPage"
2+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
5+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
6+
xmlns:utilities="using:Notepads.Utilities"
7+
mc:Ignorable="d">
98

109
<Grid>
1110
<Grid.ChildrenTransitions>
@@ -17,13 +16,12 @@
1716
<BrushTransition />
1817
</Grid.BackgroundTransition>
1918

20-
<ScrollViewer
21-
Grid.Row="0"
22-
Padding="{StaticResource SettingsPagePadding}"
23-
IsTabStop="False"
24-
UseSystemFocusVisuals="False"
25-
VerticalScrollBarVisibility="Auto"
26-
VerticalScrollMode="Auto">
19+
<ScrollViewer Grid.Row="0"
20+
Padding="{StaticResource SettingsPagePadding}"
21+
VerticalScrollBarVisibility="Auto"
22+
VerticalScrollMode="Auto"
23+
IsTabStop="False"
24+
UseSystemFocusVisuals="False">
2725
<StackPanel Margin="{StaticResource SettingsPageFooterMargin}" HorizontalAlignment="Left">
2826

2927
<!-- Status Bar -->
@@ -45,7 +43,9 @@
4543

4644
<!-- Session Snapshot -->
4745
<StackPanel x:Name="SessionSnapshotSettingsPanel" Style="{StaticResource SettingsSectionStyle}">
48-
<TextBlock x:Name="SessionSnapshotSettingsTitle" x:Uid="/Settings/AdvancedPage_SessionSnapshotSettings_Title" Style="{StaticResource CompactSubtitleTextBlockStyle}" />
46+
<TextBlock x:Name="SessionSnapshotSettingsTitle"
47+
x:Uid="/Settings/AdvancedPage_SessionSnapshotSettings_Title"
48+
Style="{StaticResource CompactSubtitleTextBlockStyle}" />
4949
<StackPanel x:Name="SessionSnapshotSettingsControls">
5050
<ToggleSwitch x:Name="EnableSessionSnapshotToggleSwitch" x:Uid="/Settings/AdvancedPage_SessionSnapshotSettings_OnOffToggleSwitch" Style="{StaticResource CustomToggleSwitchStyle}" />
5151
<TextBlock x:Uid="/Settings/AdvancedPage_SessionSnapshotSettings_Description" Style="{ThemeResource DescriptionTextBlockStyle}" />
@@ -54,45 +54,44 @@
5454

5555
<!-- Launch -->
5656
<StackPanel x:Name="LaunchPreferenceSettingsPanel" Style="{StaticResource SettingsSectionStyle}">
57-
<TextBlock x:Name="LaunchPreferenceSettingsTitle" x:Uid="/Settings/AdvancedPage_LaunchPreferenceSettings_Title" Style="{StaticResource CompactSubtitleTextBlockStyle}" />
57+
<TextBlock x:Name="LaunchPreferenceSettingsTitle"
58+
x:Uid="/Settings/AdvancedPage_LaunchPreferenceSettings_Title"
59+
Style="{StaticResource CompactSubtitleTextBlockStyle}" />
5860
<StackPanel x:Name="LaunchPreferenceSettingsControls">
5961
<ToggleSwitch x:Name="AlwaysOpenNewWindowToggleSwitch" x:Uid="/Settings/AdvancedPage_LaunchPreferenceSettings_AlwaysOpenNewWindowToggleSwitch" Style="{StaticResource CustomToggleSwitchStyle}" />
60-
<TextBlock
61-
x:Uid="/Settings/AdvancedPage_AlwaysOpenNewWindow_Description"
62-
Margin="0,0,0,10"
63-
Style="{ThemeResource DescriptionTextBlockStyle}" />
62+
<TextBlock x:Uid="/Settings/AdvancedPage_AlwaysOpenNewWindow_Description"
63+
Style="{ThemeResource DescriptionTextBlockStyle}"
64+
Margin="0,0,0,10" />
6465
<ToggleSwitch x:Name="ExitWhenLastTabClosedToggleSwitch" x:Uid="/Settings/AdvancedPage_LaunchPreferenceSettings_ExitWhenLastTabClosedToggleSwitch" Style="{StaticResource CustomToggleSwitchStyle}" />
6566
</StackPanel>
6667
</StackPanel>
6768

6869
<!-- Language -->
6970
<StackPanel Style="{StaticResource SettingsSectionStyle}">
70-
<TextBlock x:Name="LanguagePreferenceSettingsTitle" x:Uid="/Settings/AdvancedPage_LanguagePreferenceSettings_Title" Style="{StaticResource CompactSubtitleTextBlockStyle}" />
71+
<TextBlock x:Name="LanguagePreferenceSettingsTitle"
72+
x:Uid="/Settings/AdvancedPage_LanguagePreferenceSettings_Title"
73+
Style="{StaticResource CompactSubtitleTextBlockStyle}" />
7174
<StackPanel x:Name="LanguagePreferenceSettingsControls" Margin="0,6,0,0">
72-
<ComboBox
73-
x:Name="LanguagePicker"
74-
HorizontalAlignment="Stretch"
75-
VerticalAlignment="Center"
76-
Background="Transparent"
77-
IsTextSearchEnabled="True"
78-
ItemsSource="{x:Bind SupportedLanguages, Mode=OneTime}">
75+
<ComboBox x:Name="LanguagePicker"
76+
HorizontalAlignment="Stretch"
77+
VerticalAlignment="Center"
78+
IsTextSearchEnabled="True"
79+
ItemsSource="{x:Bind SupportedLanguages, Mode=OneTime}">
7980
<ComboBox.ItemTemplate>
8081
<DataTemplate x:DataType="utilities:LanguageItem">
8182
<TextBlock Text="{x:Bind Name}" />
8283
</DataTemplate>
8384
</ComboBox.ItemTemplate>
8485
</ComboBox>
85-
<TextBlock
86-
x:Name="RestartPrompt"
87-
x:Uid="/Settings/AdvancedPage_LanguagePreferenceSettings_RestartPrompt"
88-
Margin="0,8,0,0"
89-
Foreground="{ThemeResource SystemControlErrorTextForegroundBrush}"
90-
Style="{ThemeResource DescriptionTextBlockStyle}"
91-
Visibility="Collapsed" />
92-
<TextBlock
93-
x:Uid="/Settings/AdvancedPage_LanguagePreferenceSettings_Description"
94-
Margin="0,6,0,0"
95-
Style="{ThemeResource DescriptionTextBlockStyle}" />
86+
<TextBlock x:Name="RestartPrompt"
87+
x:Uid="/Settings/AdvancedPage_LanguagePreferenceSettings_RestartPrompt"
88+
Style="{ThemeResource DescriptionTextBlockStyle}"
89+
Foreground="{ThemeResource SystemControlErrorTextForegroundBrush}"
90+
Margin="0,8,0,0"
91+
Visibility="Collapsed" />
92+
<TextBlock x:Uid="/Settings/AdvancedPage_LanguagePreferenceSettings_Description"
93+
Style="{ThemeResource DescriptionTextBlockStyle}"
94+
Margin="0,6,0,0" />
9695
</StackPanel>
9796
</StackPanel>
9897

0 commit comments

Comments
 (0)