From 77e135d995050ffd9b3387e6e3c604e12911c8b8 Mon Sep 17 00:00:00 2001 From: Corvin Date: Thu, 11 Dec 2025 19:35:12 +0100 Subject: [PATCH 1/2] fix: Clip ripple effect for default Button style in `materialDesign:PopupBox` Use the BorderClipConverter to clip the ripple to the bounds of the button --- .../Themes/MaterialDesignTheme.PopupBox.xaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml index 367282c1b5..6e763cf6b9 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml @@ -17,7 +17,7 @@ - + @@ -57,7 +57,14 @@ ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" Feedback="{TemplateBinding Foreground, Converter={x:Static converters:BrushRoundConverter.Instance}}" Focusable="False" - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" /> + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" > + + + + + + + From 92991cc814e65474c313faeea3df5175a2902b99 Mon Sep 17 00:00:00 2001 From: Corvin Date: Sun, 14 Dec 2025 10:42:37 +0100 Subject: [PATCH 2/2] refactor: leverage ClipToBounds instead of a custom converter Set ClipToBounds="True" instead of using the `BorderClipConverter` in the Button ControlTemplate to prevent child elements from rendering outside the template boundaries. --- .../Themes/MaterialDesignTheme.PopupBox.xaml | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml index 6e763cf6b9..9330e3e258 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml @@ -17,7 +17,7 @@ - + @@ -57,14 +57,7 @@ ContentTemplateSelector="{TemplateBinding ContentTemplateSelector}" Feedback="{TemplateBinding Foreground, Converter={x:Static converters:BrushRoundConverter.Instance}}" Focusable="False" - SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" > - - - - - - - + SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" />