|
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. --> |
2 | 2 | <Page x:Class="AccentAnalyzerExperiment.Samples.AccentAnalyzerSample" |
3 | 3 | xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
4 | 4 | xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
5 | | - xmlns:extensions="using:CommunityToolkit.WinUI.Extensions" |
| 5 | + xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" |
6 | 6 | xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
| 7 | + xmlns:extensions="using:CommunityToolkit.WinUI.Extensions" |
| 8 | + xmlns:interactivity="using:Microsoft.Xaml.Interactivity" |
7 | 9 | xmlns:local="using:AccentAnalyzerExperiment.Samples" |
8 | 10 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
9 | | - xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors" |
10 | | - xmlns:interactivity="using:Microsoft.Xaml.Interactivity" |
11 | 11 | mc:Ignorable="d"> |
12 | 12 |
|
13 | 13 | <Page.Resources> |
14 | | - <extensions:AccentAnalyzer x:Name="AccentAnalyzer" Source="{x:Bind AccentedImage}"/> |
| 14 | + <extensions:AccentAnalyzer x:Name="AccentAnalyzer" |
| 15 | + Source="{x:Bind AccentedImage}" /> |
15 | 16 | </Page.Resources> |
16 | | - |
| 17 | + |
17 | 18 | <Grid> |
18 | 19 | <Grid.ColumnDefinitions> |
19 | 20 | <ColumnDefinition Width="*" /> |
|
22 | 23 |
|
23 | 24 | <StackPanel VerticalAlignment="Center"> |
24 | 25 | <Image x:Name="AccentedImage" |
25 | | - Source="/Helpers.AccentAnalyzerExperiment.Samples/Assets/icon.png" |
26 | | - Stretch="UniformToFill" |
27 | | - HorizontalAlignment="Center" |
28 | 26 | Width="200" |
29 | 27 | Height="200" |
30 | | - Margin="20"> |
| 28 | + Margin="20" |
| 29 | + HorizontalAlignment="Center" |
| 30 | + Source="/Helpers.AccentAnalyzerExperiment.Samples/Assets/icon.png" |
| 31 | + Stretch="UniformToFill"> |
31 | 32 | <interactivity:Interaction.Behaviors> |
32 | 33 | <interactivity:EventTriggerBehavior EventName="ImageOpened"> |
33 | | - <interactivity:InvokeCommandAction Command="{x:Bind AccentAnalyzer.AccentUpdateCommand}"/> |
| 34 | + <interactivity:InvokeCommandAction Command="{x:Bind AccentAnalyzer.AccentUpdateCommand}" /> |
34 | 35 | </interactivity:EventTriggerBehavior> |
35 | 36 | </interactivity:Interaction.Behaviors> |
36 | 37 | </Image> |
37 | | - <TextBlock Text="{x:Bind AccentAnalyzer.Colorfulness, Mode=OneWay}" |
38 | | - HorizontalAlignment="Center"/> |
| 38 | + <TextBlock HorizontalAlignment="Center" |
| 39 | + Text="{x:Bind AccentAnalyzer.Colorfulness, Mode=OneWay}" /> |
39 | 40 | </StackPanel> |
40 | 41 |
|
41 | | - <Grid Grid.Column="1" Height="400" Width="400"> |
| 42 | + <Grid Grid.Column="1" |
| 43 | + Width="400" |
| 44 | + Height="400"> |
42 | 45 | <Grid.ColumnDefinitions> |
43 | | - <ColumnDefinition/> |
44 | | - <ColumnDefinition/> |
| 46 | + <ColumnDefinition /> |
| 47 | + <ColumnDefinition /> |
45 | 48 | </Grid.ColumnDefinitions> |
46 | 49 | <Grid.RowDefinitions> |
47 | | - <RowDefinition Height="4*"/> |
48 | | - <RowDefinition Height="2*"/> |
49 | | - <RowDefinition Height="*"/> |
50 | | - <RowDefinition Height="*"/> |
| 50 | + <RowDefinition Height="4*" /> |
| 51 | + <RowDefinition Height="2*" /> |
| 52 | + <RowDefinition Height="*" /> |
| 53 | + <RowDefinition Height="*" /> |
51 | 54 | </Grid.RowDefinitions> |
52 | 55 |
|
53 | | - <!--Dominant--> |
54 | | - <Border Grid.Column="0" Grid.RowSpan="3" |
55 | | - Margin="4" Padding="2"> |
| 56 | + <!-- Dominant --> |
| 57 | + <Border Grid.RowSpan="3" |
| 58 | + Grid.Column="0" |
| 59 | + Margin="4" |
| 60 | + Padding="2"> |
56 | 61 | <Border.Background> |
57 | | - <SolidColorBrush Color="{x:Bind AccentAnalyzer.DominantColor, Mode=OneWay}"/> |
| 62 | + <SolidColorBrush Color="{x:Bind AccentAnalyzer.DominantColor, Mode=OneWay}" /> |
58 | 63 | </Border.Background> |
59 | | - <TextBlock Text="Dominant" Foreground="Black"/> |
| 64 | + <TextBlock Foreground="Black" |
| 65 | + Text="Dominant" /> |
60 | 66 | </Border> |
61 | 67 |
|
62 | | - <!--Base--> |
63 | | - <Border Grid.ColumnSpan="3" Grid.Row="4" |
64 | | - Margin="4" Padding="2"> |
| 68 | + <!-- Base --> |
| 69 | + <Border Grid.Row="4" |
| 70 | + Grid.ColumnSpan="3" |
| 71 | + Margin="4" |
| 72 | + Padding="2"> |
65 | 73 | <Border.Background> |
66 | | - <SolidColorBrush Color="{x:Bind AccentAnalyzer.BaseColor, Mode=OneWay}"/> |
| 74 | + <SolidColorBrush Color="{x:Bind AccentAnalyzer.BaseColor, Mode=OneWay}" /> |
67 | 75 | </Border.Background> |
68 | | - <TextBlock Text="Base" Foreground="Black"/> |
| 76 | + <TextBlock Foreground="Black" |
| 77 | + Text="Base" /> |
69 | 78 | </Border> |
70 | | - |
71 | | - <!--Primary--> |
72 | | - <Border Grid.Column="1" Grid.Row="0" |
73 | | - Margin="4" Padding="2"> |
| 79 | + |
| 80 | + <!-- Primary --> |
| 81 | + <Border Grid.Row="0" |
| 82 | + Grid.Column="1" |
| 83 | + Margin="4" |
| 84 | + Padding="2"> |
74 | 85 | <Border.Background> |
75 | | - <SolidColorBrush Color="{x:Bind AccentAnalyzer.PrimaryAccentColor, Mode=OneWay}"/> |
| 86 | + <SolidColorBrush Color="{x:Bind AccentAnalyzer.PrimaryAccentColor, Mode=OneWay}" /> |
76 | 87 | </Border.Background> |
77 | | - <TextBlock Text="Primary" Foreground="Black"/> |
| 88 | + <TextBlock Foreground="Black" |
| 89 | + Text="Primary" /> |
78 | 90 | </Border> |
79 | | - <!--Secondary--> |
80 | | - <Border Grid.Column="1" Grid.Row="1" |
81 | | - Margin="4" Padding="2"> |
| 91 | + <!-- Secondary --> |
| 92 | + <Border Grid.Row="1" |
| 93 | + Grid.Column="1" |
| 94 | + Margin="4" |
| 95 | + Padding="2"> |
82 | 96 | <Border.Background> |
83 | | - <SolidColorBrush Color="{x:Bind AccentAnalyzer.SecondaryAccentColor, Mode=OneWay}"/> |
| 97 | + <SolidColorBrush Color="{x:Bind AccentAnalyzer.SecondaryAccentColor, Mode=OneWay}" /> |
84 | 98 | </Border.Background> |
85 | | - <TextBlock Text="Secondary" Foreground="Black"/> |
| 99 | + <TextBlock Foreground="Black" |
| 100 | + Text="Secondary" /> |
86 | 101 | </Border> |
87 | | - <!--Tertiary--> |
88 | | - <Border Grid.Column="1" Grid.Row="2" |
89 | | - Margin="4" Padding="2"> |
| 102 | + <!-- Tertiary --> |
| 103 | + <Border Grid.Row="2" |
| 104 | + Grid.Column="1" |
| 105 | + Margin="4" |
| 106 | + Padding="2"> |
90 | 107 | <Border.Background> |
91 | | - <SolidColorBrush Color="{x:Bind AccentAnalyzer.TertiaryAccentColor, Mode=OneWay}"/> |
| 108 | + <SolidColorBrush Color="{x:Bind AccentAnalyzer.TertiaryAccentColor, Mode=OneWay}" /> |
92 | 109 | </Border.Background> |
93 | | - <TextBlock Text="Tertiary" Foreground="Black"/> |
| 110 | + <TextBlock Foreground="Black" |
| 111 | + Text="Tertiary" /> |
94 | 112 | </Border> |
95 | 113 | </Grid> |
96 | 114 | </Grid> |
|
0 commit comments