aktueller stand

This commit is contained in:
Meik
2025-11-13 18:00:31 +01:00
parent 567584faf0
commit ed80f72e81
7 changed files with 40 additions and 7 deletions

View File

@@ -32,6 +32,7 @@ namespace FasdDesktopUi.Basics.UserControls
return brush;
}
private Brush defaultErrorTypeBorderBrush;
private Thickness? defaultErrorTypeBorderThickness;
#region Properties
public event EventHandler ErrorTypeValueChanged;
@@ -103,6 +104,7 @@ namespace FasdDesktopUi.Basics.UserControls
{
InitializeComponent();
defaultErrorTypeBorderBrush = ErrorTypeValidationBorder?.BorderBrush?.CloneCurrentValue();
defaultErrorTypeBorderThickness = ErrorTypeValidationBorder?.BorderThickness;
}
protected override void OnInitialized(EventArgs e)
@@ -219,8 +221,11 @@ namespace FasdDesktopUi.Basics.UserControls
if (defaultErrorTypeBorderBrush == null)
defaultErrorTypeBorderBrush = ErrorTypeValidationBorder.BorderBrush?.CloneCurrentValue();
if (defaultErrorTypeBorderThickness == null)
defaultErrorTypeBorderThickness = ErrorTypeValidationBorder.BorderThickness;
ErrorTypeValidationBorder.BorderBrush = hasError ? ValidationBrush : defaultErrorTypeBorderBrush;
ErrorTypeValidationBorder.BorderThickness = hasError ? new Thickness(1) : defaultErrorTypeBorderThickness ?? new Thickness(0);
}
}
}