Class DataValidationErrors
A control which displays an error notifier when there is a DataValidationError. Provides attached properties to track errors on a control
[PseudoClasses(new string[] { ":error" })]
public class DataValidationErrors : ContentControl, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
DataValidationErrors
- Implements
- Inherited Members
- Extension Methods
Remarks
You will probably only want to create instances inside of control templates.
Constructors
DataValidationErrors()
public DataValidationErrors()
Fields
ErrorConverterProperty
Defines the DataValidationErrors.ErrorConverter attached property.
public static readonly AttachedProperty<Func<object, object>?> ErrorConverterProperty
Field Value
ErrorTemplateProperty
Defines the DataValidationErrors.ErrorTemplate property.
public static readonly StyledProperty<IDataTemplate> ErrorTemplateProperty
Field Value
ErrorsProperty
Defines the DataValidationErrors.Errors attached property.
public static readonly AttachedProperty<IEnumerable<object>?> ErrorsProperty
Field Value
HasErrorsProperty
Defines the DataValidationErrors.HasErrors attached property.
public static readonly AttachedProperty<bool> HasErrorsProperty
Field Value
OwnerProperty
public static readonly DirectProperty<DataValidationErrors, Control?> OwnerProperty
Field Value
Properties
ErrorTemplate
public IDataTemplate ErrorTemplate { get; set; }
Property Value
Owner
public Control? Owner { get; set; }
Property Value
Methods
ClearErrors(Control)
public static void ClearErrors(Control control)
Parameters
control
Control
GetErrorConverter(Control)
public static Func<object, object?>? GetErrorConverter(Control control)
Parameters
control
Control
Returns
GetErrors(Control)
public static IEnumerable<object>? GetErrors(Control control)
Parameters
control
Control
Returns
GetHasErrors(Control)
public static bool GetHasErrors(Control control)
Parameters
control
Control
Returns
SetError(Control, Exception?)
public static void SetError(Control control, Exception? error)
Parameters
SetErrorConverter(Control, Func<object, object>?)
public static void SetErrorConverter(Control control, Func<object, object>? converter)
Parameters
SetErrors(Control, IEnumerable<object>?)
public static void SetErrors(Control control, IEnumerable<object>? errors)
Parameters
control
Controlerrors
IEnumerable<object>