ClassValidationControl
Visual representation of errors provided through INotifyDataErrorInfo interface.
Definition
Namespace:Telerik.UI.Xaml.Controls.Primitives
Assembly:Telerik.WinUI.Controls.dll
Syntax:
public class ValidationControl : RadControl
Inheritance: objectRadControlValidationControl
Inherited Members
Constructors
ValidationControl()
Initializes a new instance of the ValidationControl class.
Declaration
public ValidationControl()
Fields
ControlPeerProperty
Identifies the ControlPeer dependency property.
Declaration
public static readonly DependencyProperty ControlPeerProperty
Field Value
DependencyProperty
DataItemProperty
Identifies the DataItem dependency property.
Declaration
public static readonly DependencyProperty DataItemProperty
Field Value
DependencyProperty
IsValidProperty
Identifies the IsValid dependency property.
Declaration
public static readonly DependencyProperty IsValidProperty
Field Value
DependencyProperty
PropertyNameProperty
Identifies the PropertyName dependency property.
Declaration
public static readonly DependencyProperty PropertyNameProperty
Field Value
DependencyProperty
RelativePositionOffsetProperty
Identifies the RelativePositionOffset dependency property.
Declaration
public static readonly DependencyProperty RelativePositionOffsetProperty
Field Value
DependencyProperty
ValidateOnErrorsProperty
Identifies the ValidateOnErrors dependency property.
Declaration
public static readonly DependencyProperty ValidateOnErrorsProperty
Field Value
DependencyProperty
Properties
ControlPeer
Gets or sets the control that will be used to position validation control.
Declaration
public FrameworkElement ControlPeer { get; set; }
Property Value
FrameworkElement
DataItem
Gets or sets the data item that if implements INotifyDataErrorInfo interface will be used as source for errors.
Errors
Gets the collection of current errors.
Declaration
public BindableCollection<object> Errors { get; }
Property Value
IsValid
Gets or sets a value indicating whether control is in valid state.
PropertyName
Gets or sets the name of the property that will be validated.
Declaration
public string PropertyName { get; set; }
Property Value
The name of the property.
RelativePositionOffset
Gets or sets the relative offset from ControlPeer control.
Declaration
public Point RelativePositionOffset { get; set; }
Property Value
Point
ValidateOnErrors
Gets or sets a value indicating whether control should trigger validation when error occurs.
Methods
ApplyTemplateCore()
Called when the Framework is called. Inheritors should override this method should they have some custom template-related logic. This is done to ensure that the property is properly initialized.
ComposeVisualStateName()
Builds the current visual state for this instance.
Declaration
protected override string ComposeVisualStateName()
Returns
Overrides
OnTemplateApplied()
Occurs when the method has been called and the template is already successfully applied.
Declaration
protected override void OnTemplateApplied()
Overrides
OnValidating(IList<object>)
Called to raise Validating event.
Declaration
protected virtual ValidatingEventArgs OnValidating(IList<object> currentErrors)
Parameters
currentErrors
The current errors.
Returns
Validate(bool)
Validates the data updates the Errors collection.
Declaration
public void Validate(bool callAsync = true)
Parameters
callAsync
Whether the validation will be executed asynchronously.
Events
Validating
Occurs when validating item.
Declaration
public event EventHandler<ValidatingEventArgs> Validating
Event Value