Skip to content

Commit 8cdcea3

Browse files
committed
make copy button always visible
1 parent 6ff1a98 commit 8cdcea3

3 files changed

Lines changed: 4 additions & 17 deletions

File tree

WinUIGallery/Controls/DesignGuidance/ColorPageExample.xaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<Grid
2020
Grid.Row="1"
21-
Margin="0,36,0,12"
21+
Margin="0,36,0,0"
2222
Padding="12"
2323
Background="{x:Bind Background, Mode=OneWay}"
2424
BorderBrush="{ThemeResource CardStrokeColorDefaultBrush}"
@@ -39,7 +39,7 @@
3939
<TextBlock Style="{ThemeResource CaptionTextBlockStyle}" Text="{x:Bind Description, Mode=OneWay}" Grid.Row="1"/>
4040
<ContentPresenter
4141
Grid.Row="2"
42-
Margin="0,16,0,16"
42+
Margin="0,12,0,12"
4343
HorizontalAlignment="Center"
4444
Content="{x:Bind ExampleContent, Mode=OneWay}" />
4545
</Grid>

WinUIGallery/Controls/DesignGuidance/ColorTile.xaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@
88
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
99
xmlns:local="using:WinUIGallery.DesktopWap.Controls.DesignGuidance"
1010
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
11-
PointerEntered="UserControl_PointerEntered"
12-
PointerExited="UserControl_PointerExited"
1311
mc:Ignorable="d">
1412

1513
<Grid>
@@ -43,19 +41,18 @@
4341

4442
<Button
4543
x:Name="CopyBrushNameButton"
44+
AutomationProperties.Name="Copy brush name"
4645
Grid.RowSpan="4"
4746
Grid.Column="1"
4847
Grid.ColumnSpan="2"
4948
Padding="4"
5049
HorizontalAlignment="Right"
5150
VerticalAlignment="Top"
52-
AutomationProperties.Name="Copy brush name"
5351
Background="Transparent"
5452
BorderBrush="Transparent"
5553
Click="CopyBrushNameButton_Click"
5654
Foreground="{x:Bind Foreground, Mode=OneWay}"
57-
ToolTipService.ToolTip="Copy brush name"
58-
Visibility="Collapsed">
55+
ToolTipService.ToolTip="Copy brush name">
5956
<FontIcon FontSize="16" Glyph="&#xE8C8;" />
6057
</Button>
6158

WinUIGallery/Controls/DesignGuidance/ColorTile.xaml.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,15 +76,5 @@ private void CopyBrushNameButton_Click(object sender, RoutedEventArgs e)
7676
Clipboard.SetContent(package);
7777

7878
}
79-
80-
private void UserControl_PointerEntered(object sender, PointerRoutedEventArgs e)
81-
{
82-
CopyBrushNameButton.Visibility = Visibility.Visible;
83-
}
84-
85-
private void UserControl_PointerExited(object sender, PointerRoutedEventArgs e)
86-
{
87-
CopyBrushNameButton.Visibility = Visibility.Collapsed;
88-
}
8979
}
9080
}

0 commit comments

Comments
 (0)