ValidationService.HasValidationError Attached Property
Indicates whether validation has failed. This is an attached property.
Namespace: DevExpress.Xpf.Editors
Assembly: DevExpress.Xpf.Core.v24.2.dll
NuGet Package: DevExpress.Wpf.Core
Declaration
Returns
Type | Description |
---|---|
Boolean |
|
Remarks
The ValidationService.HasValidationError
attached property returns true
for container controls that contain editors with validation errors. This property detects the following validation types (supported by DevExpress WPF Controls): validation interfaces, the Validate event, the ValidationService class, and ValidationRule descendants.
<Border dxe:ValidationService.IsValidationContainer="True"
BorderThickness="2"
BorderBrush="{Binding Path=(dxe:ValidationService.HasValidationError),
Converter={dxmvvm:BooleanToObjectConverter TrueValue=Red, FalseValue=Black},
RelativeSource={RelativeSource Self}}">
<dxe:TextEdit Validate="OnValidate"/>
</Border>
The ValidationErrors property returns a collection of validation errors.
See Also