Skip to content

Commit fd2fb18

Browse files
committed
Applied XAML styling
1 parent a7e534b commit fd2fb18

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed
Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
1+
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
22
<Page x:Class="ColorAnalyzerExperiment.Samples.ContrastHelperSample"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -12,64 +12,64 @@
1212

1313
<Grid>
1414
<Grid.RowDefinitions>
15-
<RowDefinition/>
16-
<RowDefinition Height="auto"/>
15+
<RowDefinition />
16+
<RowDefinition Height="auto" />
1717
</Grid.RowDefinitions>
1818

1919
<Grid.ColumnDefinitions>
20-
<ColumnDefinition/>
21-
<ColumnDefinition/>
20+
<ColumnDefinition />
21+
<ColumnDefinition />
2222
</Grid.ColumnDefinitions>
2323

2424
<Border Grid.ColumnSpan="2">
2525
<Border.Background>
26-
<SolidColorBrush Color="{x:Bind BackgroundPicker.Color, Mode=OneWay}"/>
26+
<SolidColorBrush Color="{x:Bind BackgroundPicker.Color, Mode=OneWay}" />
2727
</Border.Background>
2828
<StackPanel Spacing="2">
29-
<TextBlock Text="Always legible text"
30-
FontSize="24"
31-
helpers:ContrastHelper.Opponent="{x:Bind BackgroundPicker.Color, Mode=OneWay}"/>
32-
<TextBlock Text="Legible text (MinRatio: 5)"
29+
<TextBlock helpers:ContrastHelper.Opponent="{x:Bind BackgroundPicker.Color, Mode=OneWay}"
3330
FontSize="24"
31+
Text="Always legible text" />
32+
<TextBlock helpers:ContrastHelper.MinRatio="5"
3433
helpers:ContrastHelper.Opponent="{x:Bind BackgroundPicker.Color, Mode=OneWay}"
35-
helpers:ContrastHelper.MinRatio="5">
34+
FontSize="24"
35+
Text="Legible text (MinRatio: 5)">
3636
<TextBlock.Foreground>
37-
<SolidColorBrush Color="{x:Bind ForegroundPicker.Color, Mode=OneWay}"/>
37+
<SolidColorBrush Color="{x:Bind ForegroundPicker.Color, Mode=OneWay}" />
3838
</TextBlock.Foreground>
3939
</TextBlock>
40-
<TextBlock Text="Legible text (MinRatio: 3)"
41-
FontSize="16"
40+
<TextBlock helpers:ContrastHelper.MinRatio="3"
4241
helpers:ContrastHelper.Opponent="{x:Bind BackgroundPicker.Color, Mode=OneWay}"
43-
helpers:ContrastHelper.MinRatio="3">
42+
FontSize="16"
43+
Text="Legible text (MinRatio: 3)">
4444
<TextBlock.Foreground>
45-
<SolidColorBrush Color="{x:Bind ForegroundPicker.Color, Mode=OneWay}"/>
45+
<SolidColorBrush Color="{x:Bind ForegroundPicker.Color, Mode=OneWay}" />
4646
</TextBlock.Foreground>
4747
</TextBlock>
48-
<TextBlock Text="Potentially illegible text"
49-
FontSize="16">
48+
<TextBlock FontSize="16"
49+
Text="Potentially illegible text">
5050
<TextBlock.Foreground>
51-
<SolidColorBrush Color="{x:Bind ForegroundPicker.Color, Mode=OneWay}"/>
51+
<SolidColorBrush Color="{x:Bind ForegroundPicker.Color, Mode=OneWay}" />
5252
</TextBlock.Foreground>
5353
</TextBlock>
5454
</StackPanel>
5555
</Border>
5656

5757
<StackPanel Grid.Row="1"
5858
HorizontalAlignment="Center">
59-
<TextBlock Text="Foreground"/>
59+
<TextBlock Text="Foreground" />
6060
<ColorPicker x:Name="ForegroundPicker"
61-
Color="Black"
61+
IsColorChannelTextInputVisible="False"
6262
IsHexInputVisible="False"
63-
IsColorChannelTextInputVisible="False"/>
63+
Color="Black" />
6464
</StackPanel>
6565

66-
<StackPanel Grid.Column="1"
67-
Grid.Row="1"
66+
<StackPanel Grid.Row="1"
67+
Grid.Column="1"
6868
HorizontalAlignment="Center">
69-
<TextBlock Text="Backround"/>
69+
<TextBlock Text="Backround" />
7070
<ColorPicker x:Name="BackgroundPicker"
71-
IsHexInputVisible="False"
72-
IsColorChannelTextInputVisible="False"/>
71+
IsColorChannelTextInputVisible="False"
72+
IsHexInputVisible="False" />
7373
</StackPanel>
7474
</Grid>
7575
</Page>

0 commit comments

Comments
 (0)