From e962d1e44b0d93e992ab5d017b3007355d190077 Mon Sep 17 00:00:00 2001 From: Lorenz Stechauner Date: Thu, 16 Nov 2023 09:42:47 +0100 Subject: [PATCH] ControlUtils: small fixes --- Elwig/Helpers/ControlUtils.cs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Elwig/Helpers/ControlUtils.cs b/Elwig/Helpers/ControlUtils.cs index 135be7d..b196505 100644 --- a/Elwig/Helpers/ControlUtils.cs +++ b/Elwig/Helpers/ControlUtils.cs @@ -5,7 +5,8 @@ using System.Linq; using System.Windows; using System.Windows.Controls; using System.Windows.Controls.Primitives; -using System.Windows.Media; +using Brush = System.Windows.Media.Brush; +using Brushes = System.Windows.Media.Brushes; namespace Elwig.Helpers { public class ControlUtils { @@ -16,7 +17,7 @@ namespace Elwig.Helpers { First } - private static void SetControlBrush(Control input, Brush brush) { + private static void SetControlBorderBrush(Control input, Brush brush) { if (input is ComboBox cb) { var border = GetComboBoxBorder(cb); if (border != null) border.BorderBrush = brush; @@ -26,15 +27,15 @@ namespace Elwig.Helpers { } public static void SetInputNotDefault(Control input) { - SetControlBrush(input, Brushes.Gold); + SetControlBorderBrush(input, Brushes.Gold); } public static void SetInputChanged(Control input) { - SetControlBrush(input, Brushes.Orange); + SetControlBorderBrush(input, Brushes.Orange); } public static void SetInputInvalid(Control input) { - SetControlBrush(input, Brushes.Red); + SetControlBorderBrush(input, Brushes.Red); } public static void ClearInputState(Control input) {