From 2b5e9e2600deaf43e5d4c7d5178aba9fdf4d98a0 Mon Sep 17 00:00:00 2001 From: Corvin Date: Fri, 20 Feb 2026 17:56:48 +0100 Subject: [PATCH 1/2] fix(popupbox): add support for Background, BorderBrush, BorderThickness and ButtonAssist.CornerRadius and hover-effect to PopupBox --- .../Themes/MaterialDesignTheme.PopupBox.xaml | 42 +++++++++++++++---- 1 file changed, 34 insertions(+), 8 deletions(-) diff --git a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml index 9330e3e258..9041648cef 100644 --- a/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml +++ b/src/MaterialDesignThemes.Wpf/Themes/MaterialDesignTheme.PopupBox.xaml @@ -95,14 +95,40 @@ - + + + + + + + + + + + + + + + + + + + + + + From 9151a65b77b3c8371560e480f5b23955a6c3f9ff Mon Sep 17 00:00:00 2001 From: Corvin Date: Tue, 24 Feb 2026 16:43:20 +0100 Subject: [PATCH 2/2] test(popupbox): get border by unique name because the PopupBox now contains a nested border in it's template, the test was broken because it was getting the border in the template instead of the call-site defined content, which is wrong. getting the border by x:Name disambiguates them --- .../Samples/PopupBox/PopupBoxWithTemplateSelector.xaml | 4 ++-- .../WPF/PopupBoxes/PopupBoxTests.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/MaterialDesignThemes.UITests/Samples/PopupBox/PopupBoxWithTemplateSelector.xaml b/tests/MaterialDesignThemes.UITests/Samples/PopupBox/PopupBoxWithTemplateSelector.xaml index 06a425f517..dea8caf1f6 100644 --- a/tests/MaterialDesignThemes.UITests/Samples/PopupBox/PopupBoxWithTemplateSelector.xaml +++ b/tests/MaterialDesignThemes.UITests/Samples/PopupBox/PopupBoxWithTemplateSelector.xaml @@ -8,11 +8,11 @@ d:DesignHeight="450" d:DesignWidth="800"> - + - + (); + var border = await popupBox.GetElement("ContentBorder"); await Assert.That(await border.GetBackgroundColor()).IsEqualTo(Colors.Blue); await button.LeftClick(); await Wait.For(async () => { - border = await popupBox.GetElement(); + border = await popupBox.GetElement("ContentBorder"); await Assert.That(await border.GetBackgroundColor()).IsEqualTo(Colors.Red); });