Skip to content

Commit 24c7623

Browse files
Update the code style for XAML files
1 parent 32907a0 commit 24c7623

File tree

10 files changed

+390
-128
lines changed

10 files changed

+390
-128
lines changed

src/KeyboardSwitch.Settings/App.axaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
<Application xmlns="https://github.com/avaloniaui"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:sys="using:System"
4-
xmlns:l="using:KeyboardSwitch.Settings.Localization"
5-
xmlns:local="using:KeyboardSwitch.Settings"
6-
x:Class="KeyboardSwitch.Settings.App">
1+
<Application
2+
xmlns="https://github.com/avaloniaui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:sys="using:System"
5+
xmlns:l="using:KeyboardSwitch.Settings.Localization"
6+
xmlns:local="using:KeyboardSwitch.Settings"
7+
x:Class="KeyboardSwitch.Settings.App"
8+
>
79
<Application.DataTemplates>
810
<local:ViewLocator />
911
</Application.DataTemplates>
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
<Styles xmlns="https://github.com/avaloniaui"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
x:Class="KeyboardSwitch.Settings.Themes.MacOSTheme">
1+
<Styles
2+
xmlns="https://github.com/avaloniaui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
x:Class="KeyboardSwitch.Settings.Themes.MacOSTheme"
5+
>
46
<StyleInclude Source="avares://Devolutions.AvaloniaTheme.MacOS/MacOSTheme.axaml" />
57
</Styles>
Lines changed: 63 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,74 @@
1-
<UserControl xmlns="https://github.com/avaloniaui"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:l="using:KeyboardSwitch.Settings.Localization"
4-
x:Class="KeyboardSwitch.Settings.Views.AboutView">
1+
<UserControl
2+
xmlns="https://github.com/avaloniaui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:l="using:KeyboardSwitch.Settings.Localization"
5+
x:Class="KeyboardSwitch.Settings.Views.AboutView"
6+
>
57
<StackPanel Margin="20 0">
6-
<TextBlock Text="{l:Translate KeyboardSwitch}" Margin="10" FontSize="{DynamicResource FontSizeHuge}" />
7-
<TextBlock Text="{l:Translate CreatedBy}" Margin="10" FontSize="{DynamicResource FontSizeNormal}" />
8-
<TextBlock x:Name="VersionTextBlock" Margin="10 0 10 10" FontSize="{DynamicResource FontSizeNormal}" />
8+
<TextBlock
9+
Text="{l:Translate KeyboardSwitch}"
10+
Margin="10"
11+
FontSize="{DynamicResource FontSizeHuge}"
12+
/>
913

10-
<TextBlock x:Name="NewVersionTextBlock" Margin="10" FontSize="{DynamicResource FontSizeNormal}" />
14+
<TextBlock
15+
Text="{l:Translate CreatedBy}"
16+
Margin="10"
17+
FontSize="{DynamicResource FontSizeNormal}"
18+
/>
19+
20+
<TextBlock
21+
x:Name="VersionTextBlock"
22+
Margin="10 0 10 10"
23+
FontSize="{DynamicResource FontSizeNormal}"
24+
/>
25+
26+
<TextBlock
27+
x:Name="NewVersionTextBlock"
28+
Margin="10"
29+
FontSize="{DynamicResource FontSizeNormal}"
30+
/>
1131

1232
<WrapPanel Background="Transparent">
13-
<Button x:Name="ViewDocsButton" Margin="10 0" Content="{l:Translate ViewDocs}" Classes="accent"
14-
HorizontalAlignment="Left" />
33+
<Button
34+
x:Name="ViewDocsButton"
35+
Margin="10 0"
36+
Content="{l:Translate ViewDocs}"
37+
Classes="accent"
38+
HorizontalAlignment="Left"
39+
/>
1540

16-
<Button x:Name="CheckForUpdatesButton" Content="{l:Translate CheckForUpdates}" Classes="accent"
17-
HorizontalAlignment="Left" />
41+
<Button
42+
x:Name="CheckForUpdatesButton"
43+
Content="{l:Translate CheckForUpdates}"
44+
Classes="accent"
45+
HorizontalAlignment="Left"
46+
/>
1847

19-
<Button x:Name="GetNewVersionButton" Content="{l:Translate GetNewVersion}" Classes="accent"
20-
HorizontalAlignment="Left" IsVisible="False" />
48+
<Button
49+
x:Name="GetNewVersionButton"
50+
Content="{l:Translate GetNewVersion}"
51+
Classes="accent"
52+
HorizontalAlignment="Left"
53+
IsVisible="False"
54+
/>
2155
</WrapPanel>
2256

23-
<TextBlock x:Name="NoNewVersionsTextBlock" Text="{l:Translate NoNewVersions}" Margin="10"
24-
FontSize="{DynamicResource FontSizeNormal}" IsVisible="False" />
57+
<TextBlock
58+
x:Name="NoNewVersionsTextBlock"
59+
Text="{l:Translate NoNewVersions}"
60+
Margin="10"
61+
FontSize="{DynamicResource FontSizeNormal}"
62+
IsVisible="False"
63+
/>
2564

26-
<TextBlock x:Name="GetNewVersionHintTextBlock" Text="{l:Translate GetNewVersionHint}" Margin="10"
27-
FontSize="{DynamicResource FontSizeNormal}" TextWrapping="Wrap" IsVisible="False" />
65+
<TextBlock
66+
x:Name="GetNewVersionHintTextBlock"
67+
Text="{l:Translate GetNewVersionHint}"
68+
Margin="10"
69+
FontSize="{DynamicResource FontSizeNormal}"
70+
TextWrapping="Wrap"
71+
IsVisible="False"
72+
/>
2873
</StackPanel>
2974
</UserControl>

src/KeyboardSwitch.Settings/Views/CharMappingView.axaml

Lines changed: 51 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
<UserControl xmlns="https://github.com/avaloniaui"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:l="using:KeyboardSwitch.Settings.Localization"
4-
x:Class="KeyboardSwitch.Settings.Views.CharMappingView">
1+
<UserControl
2+
xmlns="https://github.com/avaloniaui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:l="using:KeyboardSwitch.Settings.Localization"
5+
x:Class="KeyboardSwitch.Settings.Views.CharMappingView"
6+
>
57
<UserControl.Styles>
68
<Style Selector="TextBlock.Hint">
79
<Setter Property="Margin" Value="10" />
@@ -17,26 +19,57 @@
1719
<Button x:Name="CancelButton" Content="{l:Translate Cancel}" />
1820
</StackPanel>
1921

20-
<TextBlock x:Name="CurrentPositionTextBlock" DockPanel.Dock="Bottom" IsVisible="False" Margin="5" />
22+
<TextBlock
23+
x:Name="CurrentPositionTextBlock"
24+
Margin="5"
25+
IsVisible="False"
26+
DockPanel.Dock="Bottom"
27+
/>
2128

22-
<ScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Auto"
23-
VerticalAlignment="Stretch">
29+
<ScrollViewer
30+
VerticalScrollBarVisibility="Auto"
31+
HorizontalScrollBarVisibility="Auto"
32+
VerticalAlignment="Stretch"
33+
>
2434
<StackPanel VerticalAlignment="Top">
25-
<ItemsControl x:Name="Layouts" HorizontalAlignment="Stretch" VerticalAlignment="Top"
26-
Grid.IsSharedSizeScope="True" />
35+
<ItemsControl
36+
x:Name="Layouts"
37+
HorizontalAlignment="Stretch"
38+
VerticalAlignment="Top"
39+
Grid.IsSharedSizeScope="True"
40+
/>
2741

28-
<Button x:Name="AutoConfigureButton" Content="{l:Translate AutoConfigure}" Classes="accent"
29-
FontSize="{DynamicResource FontSizeLarge}" Margin="10" HorizontalAlignment="Center"
30-
IsVisible="False" />
42+
<Button
43+
x:Name="AutoConfigureButton"
44+
Content="{l:Translate AutoConfigure}"
45+
Classes="accent"
46+
FontSize="{DynamicResource FontSizeLarge}"
47+
Margin="10"
48+
HorizontalAlignment="Center"
49+
IsVisible="False"
50+
/>
3151

32-
<TextBlock x:Name="NewLayoutsTextBlock" Text="{l:Translate NewLayoutsHint}" Classes="Hint"
33-
IsVisible="False" />
52+
<TextBlock
53+
x:Name="NewLayoutsTextBlock"
54+
Text="{l:Translate NewLayoutsHint}"
55+
Classes="Hint"
56+
IsVisible="False"
57+
/>
3458

35-
<StackPanel x:Name="RemoveLayoutsPanel" Orientation="Horizontal" HorizontalAlignment="Center"
36-
IsVisible="False">
59+
<StackPanel
60+
x:Name="RemoveLayoutsPanel"
61+
Orientation="Horizontal"
62+
HorizontalAlignment="Center"
63+
IsVisible="False"
64+
>
3765
<TextBlock Text="{l:Translate RemoveLayoutsHint}" Classes="Hint" MaxWidth="500" />
38-
<Button x:Name="RemoveLayoutsButton" Content="{l:Translate DeleteLayoutConfiguration}"
39-
Margin="0 10" VerticalAlignment="Center" />
66+
67+
<Button
68+
x:Name="RemoveLayoutsButton"
69+
Content="{l:Translate DeleteLayoutConfiguration}"
70+
Margin="0 10"
71+
VerticalAlignment="Center"
72+
/>
4073
</StackPanel>
4174
</StackPanel>
4275
</ScrollViewer>

src/KeyboardSwitch.Settings/Views/LayoutView.axaml

Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
<UserControl xmlns="https://github.com/avaloniaui"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
x:Class="KeyboardSwitch.Settings.Views.LayoutView">
1+
<UserControl
2+
xmlns="https://github.com/avaloniaui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
x:Class="KeyboardSwitch.Settings.Views.LayoutView"
5+
>
46
<Grid Margin="5">
57
<Grid.ColumnDefinitions>
68
<ColumnDefinition Width="Auto" SharedSizeGroup="Layout" />
@@ -13,12 +15,30 @@
1315
</Grid.RowDefinitions>
1416

1517
<StackPanel VerticalAlignment="Center" Grid.Row="0" Grid.Column="0" Margin="0 0 10 0">
16-
<TextBlock x:Name="LanguageTextBlock" FontSize="{DynamicResource FontSizeLarge}" Margin="2" />
17-
<TextBlock x:Name="KeyboardTextBlock" FontSize="{DynamicResource FontSizeSmall}" Margin="2 0 2 2" />
18+
<TextBlock
19+
x:Name="LanguageTextBlock"
20+
FontSize="{DynamicResource FontSizeLarge}"
21+
Margin="2"
22+
/>
23+
24+
<TextBlock
25+
x:Name="KeyboardTextBlock"
26+
FontSize="{DynamicResource FontSizeSmall}"
27+
Margin="2 0 2 2"
28+
/>
1829
</StackPanel>
1930

20-
<TextBox x:Name="CharsTextBox" Grid.Row="0" Grid.Column="1" FontFamily="/Assets#Cascadia Mono" FontSize="14"
21-
FontWeight="Regular" VerticalAlignment="Center" HorizontalAlignment="Left" MinWidth="300" />
31+
<TextBox
32+
x:Name="CharsTextBox"
33+
Grid.Row="0"
34+
Grid.Column="1"
35+
FontFamily="/Assets#Cascadia Mono"
36+
FontSize="14"
37+
FontWeight="Regular"
38+
VerticalAlignment="Center"
39+
HorizontalAlignment="Left"
40+
MinWidth="300"
41+
/>
2242

2343
<TextBlock x:Name="DuplicateCharsTextBlock" Grid.Row="1" Grid.Column="1" Classes="Error" />
2444
</Grid>

src/KeyboardSwitch.Settings/Views/MainContentView.axaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
<UserControl xmlns="https://github.com/avaloniaui"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:local="using:KeyboardSwitch.Settings.Views"
4-
xmlns:l="using:KeyboardSwitch.Settings.Localization"
5-
x:Class="KeyboardSwitch.Settings.Views.MainContentView">
1+
<UserControl
2+
xmlns="https://github.com/avaloniaui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:local="using:KeyboardSwitch.Settings.Views"
5+
xmlns:l="using:KeyboardSwitch.Settings.Localization"
6+
x:Class="KeyboardSwitch.Settings.Views.MainContentView"
7+
>
68
<TabControl>
79
<TabItem x:Name="CharMappingTabItem" Header="{l:Translate CharMapping}" />
810
<TabItem x:Name="PreferencesTabItem" Header="{l:Translate Preferences}" />

src/KeyboardSwitch.Settings/Views/MainWindow.axaml

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
1-
<Window xmlns="https://github.com/avaloniaui"
2-
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:l="using:KeyboardSwitch.Settings.Localization"
4-
x:Class="KeyboardSwitch.Settings.Views.MainWindow"
5-
Icon="/Assets/icon.ico" WindowStartupLocation="CenterScreen"
6-
Title="{l:Translate WindowTitle}" Width="1100" Height="450"
7-
MinWidth="450" MinHeight="400">
1+
<Window
2+
xmlns="https://github.com/avaloniaui"
3+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
4+
xmlns:l="using:KeyboardSwitch.Settings.Localization"
5+
x:Class="KeyboardSwitch.Settings.Views.MainWindow"
6+
Icon="/Assets/icon.ico"
7+
WindowStartupLocation="CenterScreen"
8+
Title="{l:Translate WindowTitle}"
9+
Width="1100"
10+
Height="450"
11+
MinWidth="450"
12+
MinHeight="400"
13+
>
814
<DockPanel>
915
<ContentControl x:Name="ServiceViewContent" DockPanel.Dock="Bottom" />
1016
<ContentControl x:Name="MainContent" />

0 commit comments

Comments
 (0)