diff --git a/MainDemo.Wpf/Pickers.xaml b/MainDemo.Wpf/Pickers.xaml index eb718f0f84..ada98ecbd5 100644 --- a/MainDemo.Wpf/Pickers.xaml +++ b/MainDemo.Wpf/Pickers.xaml @@ -198,6 +198,60 @@ materialDesign:HintAssist.HelperText="Helper text" Style="{StaticResource MaterialDesignOutlinedDatePicker}"/> + + + + + + + + + + + + + + + + GetThemeColor(string name) return resource.GetAs() ?? throw new Exception($"Failed to convert resource '{name}' to color"); } - protected async Task> LoadXaml(string xaml) + protected async Task> LoadXaml(string xaml, params (string namespacePrefix, Type type)[] additionalNamespaceDeclarations) { await App.InitializeWithMaterialDesign(); - return await App.CreateWindowWith(xaml); + return await App.CreateWindowWith(xaml, additionalNamespaceDeclarations); } protected async Task LoadUserControl() diff --git a/MaterialDesignThemes.UITests/WPF/DatePickers/DatePickerTests.cs b/MaterialDesignThemes.UITests/WPF/DatePickers/DatePickerTests.cs index 4a2331be03..1a9bf08708 100644 --- a/MaterialDesignThemes.UITests/WPF/DatePickers/DatePickerTests.cs +++ b/MaterialDesignThemes.UITests/WPF/DatePickers/DatePickerTests.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.ComponentModel; using System.Globalization; using System.Threading.Tasks; @@ -64,5 +64,75 @@ await Wait.For(async () => recorder.Success(); } + + [Fact] + [Description("Issue 2737")] + public async Task OutlinedDatePicker_RespectsActiveAndInactiveBorderThickness_WhenAttachedPropertiesAreSet() + { + await using var recorder = new TestRecorder(App); + + // Arrange + var expectedInactiveBorderThickness = new Thickness(4, 3, 2, 1); + var expectedActiveBorderThickness = new Thickness(1, 2, 3, 4); + var stackPanel = await LoadXaml($@" + + + + + + + + + + +