From fa64d7ed4da9b15c8040cdb9d573e686192a0295 Mon Sep 17 00:00:00 2001 From: Rudy Huyn <rudyhuyn@gmail.com> Date: Thu, 5 Sep 2019 14:29:41 -0700 Subject: [PATCH] Fix corner radius when hover (#1269) --- dev/AutoSuggestBox/AutoSuggestBox_themeresources.xaml | 6 ++++-- dev/CommonStyles/PasswordBox_themeresources.xaml | 8 +++++--- dev/CommonStyles/TextBox_themeresources.xaml | 8 +++++--- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/dev/AutoSuggestBox/AutoSuggestBox_themeresources.xaml b/dev/AutoSuggestBox/AutoSuggestBox_themeresources.xaml index df3abbb784..22aae7217a 100644 --- a/dev/AutoSuggestBox/AutoSuggestBox_themeresources.xaml +++ b/dev/AutoSuggestBox/AutoSuggestBox_themeresources.xaml @@ -62,8 +62,9 @@ <Grid x:Name="ButtonLayoutGrid" BorderBrush="{ThemeResource TextControlButtonBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" - Background="{ThemeResource TextControlButtonBackground}"> - + Background="{ThemeResource TextControlButtonBackground}" + contract7Present:CornerRadius="{TemplateBinding CornerRadius}" + contract7NotPresent:CornerRadius="{Binding Source={ThemeResource ControlCornerRadius}, Converter={StaticResource RightCornerRadiusFilterConverter}}"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal" /> @@ -334,6 +335,7 @@ Grid.Row="1" Style="{StaticResource DeleteButtonStyle}" BorderThickness="{TemplateBinding BorderThickness}" + contract7Present:CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CornerRadius, Converter={StaticResource RightCornerRadiusFilterConverter}}" IsTabStop="False" Grid.Column="1" Visibility="Collapsed" diff --git a/dev/CommonStyles/PasswordBox_themeresources.xaml b/dev/CommonStyles/PasswordBox_themeresources.xaml index 90a56fc877..e0c969eb64 100644 --- a/dev/CommonStyles/PasswordBox_themeresources.xaml +++ b/dev/CommonStyles/PasswordBox_themeresources.xaml @@ -42,8 +42,9 @@ <Grid x:Name="ButtonLayoutGrid" BorderBrush="{ThemeResource TextControlButtonBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" - Background="{ThemeResource TextControlButtonBackground}"> - + Background="{ThemeResource TextControlButtonBackground}" + contract7Present:CornerRadius="{TemplateBinding CornerRadius}" + contract7NotPresent:CornerRadius="{Binding Source={ThemeResource ControlCornerRadius}, Converter={StaticResource RightCornerRadiusFilterConverter}}"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal" /> @@ -277,7 +278,8 @@ Grid.Column="1" Style="{StaticResource RevealButtonStyle}" BorderThickness="{TemplateBinding BorderThickness}" - Margin="{ThemeResource HelperButtonThemePadding}" + contract7Present:CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CornerRadius, Converter={StaticResource RightCornerRadiusFilterConverter}}" + Padding="{ThemeResource HelperButtonThemePadding}" IsTabStop="False" Visibility="Collapsed" FontSize="{TemplateBinding FontSize}" diff --git a/dev/CommonStyles/TextBox_themeresources.xaml b/dev/CommonStyles/TextBox_themeresources.xaml index 4bd70e8c9f..0fd53459f0 100644 --- a/dev/CommonStyles/TextBox_themeresources.xaml +++ b/dev/CommonStyles/TextBox_themeresources.xaml @@ -105,8 +105,9 @@ <Grid x:Name="ButtonLayoutGrid" BorderBrush="{ThemeResource TextControlButtonBorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" - Background="{ThemeResource TextControlButtonBackground}"> - + Background="{ThemeResource TextControlButtonBackground}" + contract7Present:CornerRadius="{TemplateBinding CornerRadius}" + contract7NotPresent:CornerRadius="{Binding Source={ThemeResource ControlCornerRadius}, Converter={StaticResource RightCornerRadiusFilterConverter}}"> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Name="CommonStates"> <VisualState x:Name="Normal" /> @@ -323,7 +324,8 @@ Grid.Column="1" Style="{StaticResource DeleteButtonStyle}" BorderThickness="{TemplateBinding BorderThickness}" - Margin="{ThemeResource HelperButtonThemePadding}" + contract7Present:CornerRadius="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=CornerRadius, Converter={StaticResource RightCornerRadiusFilterConverter}}" + Padding="{ThemeResource HelperButtonThemePadding}" IsTabStop="False" Visibility="Collapsed" AutomationProperties.AccessibilityView="Raw"