-
Notifications
You must be signed in to change notification settings - Fork 663
/
Copy pathColorTile.xaml
98 lines (91 loc) · 4.08 KB
/
ColorTile.xaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<!-- Copyright (c) Microsoft Corporation and Contributors. -->
<!-- Licensed under the MIT License. -->
<UserControl
x:Class="WinUIGallery.DesktopWap.Controls.DesignGuidance.ColorTile"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:local="using:WinUIGallery.DesktopWap.Controls.DesignGuidance"
xmlns:localControls="using:WinUIGallery.DesktopWap.Controls"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Grid
Padding="12"
Background="{x:Bind Background, Mode=OneWay}"
RowSpacing="6">
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="*" MinHeight="30" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="30" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<TextBlock
Foreground="{x:Bind Foreground, Mode=OneWay}"
IsTextSelectionEnabled="True"
Style="{ThemeResource BodyStrongTextBlockStyle}"
Text="{x:Bind ColorName, Mode=OneWay}"
TextWrapping="WrapWholeWords" />
<localControls:CopyButton
x:Name="CopyBrushNameButton"
AutomationProperties.Name="Copy brush name"
Grid.RowSpan="4"
Grid.Column="1"
Grid.ColumnSpan="2"
HorizontalAlignment="Right"
VerticalAlignment="Top"
Background="Transparent"
BorderBrush="Transparent"
Click="CopyBrushNameButton_Click"
Content=""
Foreground="{x:Bind Foreground, Mode=OneWay}"
ToolTipService.ToolTip="Copy brush name"/>
<TextBlock
Grid.Row="1"
Margin="0,-4,0,0"
IsTextSelectionEnabled="True"
Style="{StaticResource CaptionTextBlockStyle}"
Text="{x:Bind ColorExplanation, Mode=OneWay}"
TextWrapping="WrapWholeWords" />
<TextBlock
Grid.Row="3"
Grid.ColumnSpan="2"
IsTextSelectionEnabled="True"
Style="{StaticResource CaptionTextBlockStyle}"
Text="{x:Bind ColorBrushName, Mode=OneWay}"
TextWrapping="Wrap" />
<Grid
Grid.Row="3"
Grid.Column="2"
Margin="0,0,4,0"
Background="Transparent"
ToolTipService.ToolTip="This brush might not (yet) be available in WinUI."
Visibility="{x:Bind ShowWarning, Mode=OneWay}">
<FontIcon
FontSize="16"
Foreground="{ThemeResource SystemFillColorCriticalBrush}"
Glyph="" />
</Grid>
<!-- Right now, we don't want to display colors. If we ever want to show them again, we can show them again by using the following code. -->
<!--<TextBlock Text="{x:Bind ColorValue, Mode=OneWay}" Grid.Row="4" Grid.ColumnSpan="2" TextWrapping="WrapWholeWords" Style="{StaticResource CaptionTextBlockStyle}"/>-->
</Grid>
<Border
Grid.Column="1"
Width="1"
HorizontalAlignment="Right"
VerticalAlignment="Stretch"
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
BorderThickness="1"
Visibility="{x:Bind ShowSeparator, Mode=OneWay}" />
</Grid>
</UserControl>