Move input states from Validator to Utils
This commit is contained in:
@ -5,9 +5,22 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Media;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
|
||||
namespace WGneu {
|
||||
class Utils {
|
||||
public static void SetInputChanged(Control input) {
|
||||
input.BorderBrush = Brushes.Orange;
|
||||
}
|
||||
|
||||
public static void SetInputInvalid(Control input) {
|
||||
input.BorderBrush = Brushes.Red;
|
||||
}
|
||||
|
||||
public static void ClearInputState(Control input) {
|
||||
input.ClearValue(Control.BorderBrushProperty);
|
||||
}
|
||||
|
||||
public static IEnumerable<T> FindVisualChilds<T>(DependencyObject depObj) where T : DependencyObject {
|
||||
if (depObj == null)
|
||||
yield return (T)Enumerable.Empty<T>();
|
||||
|
Reference in New Issue
Block a user