Skip to content

Commit 27b1fbc

Browse files
committed
refactor: StyleXaml
1 parent e0f90aa commit 27b1fbc

File tree

75 files changed

+1086
-1306
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+1086
-1306
lines changed

build.cake

+1-1
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ void ExecuteProcess(FilePath fileName, ProcessArgumentBuilder arguments, string
368368
Task("Default")
369369
.IsDependentOn("Clean")
370370
.IsDependentOn("Restore")
371-
// .IsDependentOn("StyleXaml")
371+
.IsDependentOn("StyleXaml")
372372
.IsDependentOn("Build")
373373
;
374374

Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:iconPacks="using:MahApps.Metro.IconPacks"
4-
xmlns:converter="using:MahApps.Metro.IconPacks.Converter">
3+
xmlns:converter="using:MahApps.Metro.IconPacks.Converter"
4+
xmlns:iconPacks="using:MahApps.Metro.IconPacks">
55

66
<ControlTemplate x:Key="MahApps.Templates.PackIconBootstrapIcons" TargetType="iconPacks:PackIconBootstrapIcons">
77
<Grid>
88
<Border Background="{TemplateBinding Background}"
99
BorderBrush="{TemplateBinding BorderBrush}"
1010
BorderThickness="{TemplateBinding BorderThickness}" />
1111
<Grid x:Name="PART_InnerGrid"
12+
Margin="{TemplateBinding BorderThickness}"
1213
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
1314
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
14-
RenderTransformOrigin="0.5 0.5"
15-
Margin="{TemplateBinding BorderThickness}">
15+
RenderTransformOrigin="0.5 0.5">
1616
<Grid.RenderTransform>
1717
<TransformGroup>
18-
<ScaleTransform x:Name="FlipTransform"
19-
ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleXValueConverter}}"
20-
ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleYValueConverter}}" />
21-
<RotateTransform x:Name="RotationTransform"
22-
Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle, Mode=OneWay}" />
18+
<ScaleTransform x:Name="FlipTransform" ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleXValueConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleYValueConverter}}" />
19+
<RotateTransform x:Name="RotationTransform" Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle, Mode=OneWay}" />
2320
<RotateTransform x:Name="SpinTransform" />
2421
</TransformGroup>
2522
</Grid.RenderTransform>
2623
<Viewbox Margin="{TemplateBinding Padding}">
27-
<Path Fill="{TemplateBinding Foreground}"
28-
Stretch="Uniform"
29-
Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
24+
<Path Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
25+
Fill="{TemplateBinding Foreground}"
3026
RenderTransformOrigin="0.5 0.5"
27+
Stretch="Uniform"
3128
UseLayoutRounding="False">
3229
<Path.RenderTransform>
3330
<ScaleTransform ScaleY="-1" />
@@ -39,17 +36,17 @@
3936
</ControlTemplate>
4037

4138
<Style x:Key="MahApps.Styles.PackIconBootstrapIcons" TargetType="iconPacks:PackIconBootstrapIcons">
42-
<Setter Property="Height" Value="16" />
43-
<Setter Property="Width" Value="16" />
44-
<Setter Property="Padding" Value="0" />
4539
<Setter Property="FlowDirection" Value="LeftToRight" />
40+
<Setter Property="Height" Value="16" />
4641
<Setter Property="HorizontalAlignment" Value="Left" />
47-
<Setter Property="VerticalAlignment" Value="Top" />
42+
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
4843
<Setter Property="IsTabStop" Value="False" />
49-
<Setter Property="UseLayoutRounding" Value="False" />
44+
<Setter Property="Padding" Value="0" />
5045
<Setter Property="Template" Value="{StaticResource MahApps.Templates.PackIconBootstrapIcons}" />
51-
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
46+
<Setter Property="UseLayoutRounding" Value="False" />
47+
<Setter Property="VerticalAlignment" Value="Top" />
5248
<Setter Property="VerticalContentAlignment" Value="Stretch" />
49+
<Setter Property="Width" Value="16" />
5350
</Style>
5451

5552
</ResourceDictionary>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:iconPacks="clr-namespace:MahApps.Metro.IconPacks"
4-
xmlns:converter="clr-namespace:MahApps.Metro.IconPacks.Converter;assembly=MahApps.Metro.IconPacks.Core">
3+
xmlns:converter="clr-namespace:MahApps.Metro.IconPacks.Converter;assembly=MahApps.Metro.IconPacks.Core"
4+
xmlns:iconPacks="clr-namespace:MahApps.Metro.IconPacks">
55

66
<ControlTemplate x:Key="MahApps.Templates.PackIconBootstrapIcons" TargetType="{x:Type iconPacks:PackIconBootstrapIcons}">
77
<Grid>
@@ -10,25 +10,22 @@
1010
BorderThickness="{TemplateBinding BorderThickness}"
1111
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
1212
<Grid x:Name="PART_InnerGrid"
13+
Margin="{TemplateBinding BorderThickness}"
1314
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
1415
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
15-
RenderTransformOrigin="0.5 0.5"
16-
Margin="{TemplateBinding BorderThickness}">
16+
RenderTransformOrigin="0.5 0.5">
1717
<Grid.RenderTransform>
1818
<TransformGroup>
19-
<ScaleTransform x:Name="FlipTransform"
20-
ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleXValueConverter}}"
21-
ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleYValueConverter}}" />
22-
<RotateTransform x:Name="RotationTransform"
23-
Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle, Mode=OneWay}" />
19+
<ScaleTransform x:Name="FlipTransform" ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleXValueConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleYValueConverter}}" />
20+
<RotateTransform x:Name="RotationTransform" Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle, Mode=OneWay}" />
2421
<RotateTransform x:Name="SpinTransform" />
2522
</TransformGroup>
2623
</Grid.RenderTransform>
2724
<Viewbox Margin="{TemplateBinding Padding}">
28-
<Path Fill="{TemplateBinding Foreground}"
29-
Stretch="Uniform"
30-
Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
25+
<Path Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
26+
Fill="{TemplateBinding Foreground}"
3127
SnapsToDevicePixels="False"
28+
Stretch="Uniform"
3229
UseLayoutRounding="False">
3330
<Path.LayoutTransform>
3431
<ScaleTransform ScaleY="-1" />
@@ -40,18 +37,18 @@
4037
</ControlTemplate>
4138

4239
<Style x:Key="MahApps.Styles.PackIconBootstrapIcons" TargetType="{x:Type iconPacks:PackIconBootstrapIcons}">
43-
<Setter Property="Height" Value="16" />
44-
<Setter Property="Width" Value="16" />
45-
<Setter Property="Padding" Value="0" />
4640
<Setter Property="FlowDirection" Value="LeftToRight" />
41+
<Setter Property="Height" Value="16" />
4742
<Setter Property="HorizontalAlignment" Value="Left" />
48-
<Setter Property="VerticalAlignment" Value="Top" />
43+
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
4944
<Setter Property="IsTabStop" Value="False" />
45+
<Setter Property="Padding" Value="0" />
5046
<Setter Property="SnapsToDevicePixels" Value="False" />
51-
<Setter Property="UseLayoutRounding" Value="False" />
5247
<Setter Property="Template" Value="{StaticResource MahApps.Templates.PackIconBootstrapIcons}" />
53-
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
48+
<Setter Property="UseLayoutRounding" Value="False" />
49+
<Setter Property="VerticalAlignment" Value="Top" />
5450
<Setter Property="VerticalContentAlignment" Value="Stretch" />
51+
<Setter Property="Width" Value="16" />
5552
</Style>
5653

5754
</ResourceDictionary>
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,30 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:iconPacks="using:MahApps.Metro.IconPacks"
4-
xmlns:converter="using:MahApps.Metro.IconPacks.Converter">
3+
xmlns:converter="using:MahApps.Metro.IconPacks.Converter"
4+
xmlns:iconPacks="using:MahApps.Metro.IconPacks">
55

66
<ControlTemplate x:Key="MahApps.Templates.PackIconBoxIcons" TargetType="iconPacks:PackIconBoxIcons">
77
<Grid>
88
<Border Background="{TemplateBinding Background}"
99
BorderBrush="{TemplateBinding BorderBrush}"
1010
BorderThickness="{TemplateBinding BorderThickness}" />
1111
<Grid x:Name="PART_InnerGrid"
12+
Margin="{TemplateBinding BorderThickness}"
1213
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
1314
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
14-
RenderTransformOrigin="0.5 0.5"
15-
Margin="{TemplateBinding BorderThickness}">
15+
RenderTransformOrigin="0.5 0.5">
1616
<Grid.RenderTransform>
1717
<TransformGroup>
18-
<ScaleTransform x:Name="FlipTransform"
19-
ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleXValueConverter}}"
20-
ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleYValueConverter}}" />
21-
<RotateTransform x:Name="RotationTransform"
22-
Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle, Mode=OneWay}" />
18+
<ScaleTransform x:Name="FlipTransform" ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleXValueConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleYValueConverter}}" />
19+
<RotateTransform x:Name="RotationTransform" Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle, Mode=OneWay}" />
2320
<RotateTransform x:Name="SpinTransform" />
2421
</TransformGroup>
2522
</Grid.RenderTransform>
2623
<Viewbox Margin="{TemplateBinding Padding}">
27-
<Path Fill="{TemplateBinding Foreground}"
28-
Stretch="Uniform"
29-
Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
24+
<Path Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
25+
Fill="{TemplateBinding Foreground}"
3026
RenderTransformOrigin="0.5 0.5"
27+
Stretch="Uniform"
3128
UseLayoutRounding="False">
3229
<Path.RenderTransform>
3330
<ScaleTransform ScaleY="-1" />
@@ -39,17 +36,17 @@
3936
</ControlTemplate>
4037

4138
<Style x:Key="MahApps.Styles.PackIconBoxIcons" TargetType="iconPacks:PackIconBoxIcons">
42-
<Setter Property="Height" Value="16" />
43-
<Setter Property="Width" Value="16" />
44-
<Setter Property="Padding" Value="0" />
4539
<Setter Property="FlowDirection" Value="LeftToRight" />
40+
<Setter Property="Height" Value="16" />
4641
<Setter Property="HorizontalAlignment" Value="Left" />
47-
<Setter Property="VerticalAlignment" Value="Top" />
42+
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
4843
<Setter Property="IsTabStop" Value="False" />
49-
<Setter Property="UseLayoutRounding" Value="False" />
44+
<Setter Property="Padding" Value="0" />
5045
<Setter Property="Template" Value="{StaticResource MahApps.Templates.PackIconBoxIcons}" />
51-
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
46+
<Setter Property="UseLayoutRounding" Value="False" />
47+
<Setter Property="VerticalAlignment" Value="Top" />
5248
<Setter Property="VerticalContentAlignment" Value="Stretch" />
49+
<Setter Property="Width" Value="16" />
5350
</Style>
5451

5552
</ResourceDictionary>
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
22
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
3-
xmlns:iconPacks="clr-namespace:MahApps.Metro.IconPacks"
4-
xmlns:converter="clr-namespace:MahApps.Metro.IconPacks.Converter;assembly=MahApps.Metro.IconPacks.Core">
3+
xmlns:converter="clr-namespace:MahApps.Metro.IconPacks.Converter;assembly=MahApps.Metro.IconPacks.Core"
4+
xmlns:iconPacks="clr-namespace:MahApps.Metro.IconPacks">
55

66
<ControlTemplate x:Key="MahApps.Templates.PackIconBoxIcons" TargetType="{x:Type iconPacks:PackIconBoxIcons}">
77
<Grid>
@@ -10,25 +10,22 @@
1010
BorderThickness="{TemplateBinding BorderThickness}"
1111
SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />
1212
<Grid x:Name="PART_InnerGrid"
13+
Margin="{TemplateBinding BorderThickness}"
1314
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
1415
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
15-
RenderTransformOrigin="0.5 0.5"
16-
Margin="{TemplateBinding BorderThickness}">
16+
RenderTransformOrigin="0.5 0.5">
1717
<Grid.RenderTransform>
1818
<TransformGroup>
19-
<ScaleTransform x:Name="FlipTransform"
20-
ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleXValueConverter}}"
21-
ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleYValueConverter}}" />
22-
<RotateTransform x:Name="RotationTransform"
23-
Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle, Mode=OneWay}" />
19+
<ScaleTransform x:Name="FlipTransform" ScaleX="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleXValueConverter}}" ScaleY="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Flip, Mode=OneWay, Converter={converter:FlipToScaleYValueConverter}}" />
20+
<RotateTransform x:Name="RotationTransform" Angle="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=RotationAngle, Mode=OneWay}" />
2421
<RotateTransform x:Name="SpinTransform" />
2522
</TransformGroup>
2623
</Grid.RenderTransform>
2724
<Viewbox Margin="{TemplateBinding Padding}">
28-
<Path Fill="{TemplateBinding Foreground}"
29-
Stretch="Uniform"
30-
Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
25+
<Path Data="{Binding Data, RelativeSource={RelativeSource TemplatedParent}, Mode=OneWay, Converter={converter:NullToUnsetValueConverter}}"
26+
Fill="{TemplateBinding Foreground}"
3127
SnapsToDevicePixels="False"
28+
Stretch="Uniform"
3229
UseLayoutRounding="False">
3330
<Path.LayoutTransform>
3431
<ScaleTransform ScaleY="-1" />
@@ -40,18 +37,18 @@
4037
</ControlTemplate>
4138

4239
<Style x:Key="MahApps.Styles.PackIconBoxIcons" TargetType="{x:Type iconPacks:PackIconBoxIcons}">
43-
<Setter Property="Height" Value="16" />
44-
<Setter Property="Width" Value="16" />
45-
<Setter Property="Padding" Value="0" />
4640
<Setter Property="FlowDirection" Value="LeftToRight" />
41+
<Setter Property="Height" Value="16" />
4742
<Setter Property="HorizontalAlignment" Value="Left" />
48-
<Setter Property="VerticalAlignment" Value="Top" />
43+
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
4944
<Setter Property="IsTabStop" Value="False" />
45+
<Setter Property="Padding" Value="0" />
5046
<Setter Property="SnapsToDevicePixels" Value="False" />
51-
<Setter Property="UseLayoutRounding" Value="False" />
5247
<Setter Property="Template" Value="{StaticResource MahApps.Templates.PackIconBoxIcons}" />
53-
<Setter Property="HorizontalContentAlignment" Value="Stretch" />
48+
<Setter Property="UseLayoutRounding" Value="False" />
49+
<Setter Property="VerticalAlignment" Value="Top" />
5450
<Setter Property="VerticalContentAlignment" Value="Stretch" />
51+
<Setter Property="Width" Value="16" />
5552
</Style>
5653

5754
</ResourceDictionary>

0 commit comments

Comments
 (0)