aktueller stand
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user