Class ValidationSummary
Displays a summary of validation errors on a form.
Inherited Members
Namespace: System.Windows.Controls
Assembly: Controls.Data.Input.OpenSilver.dll
Syntax
public class ValidationSummary : Control
Constructors
| Improve this Doc View SourceValidationSummary()
Initializes a new instance of the ValidationSummary class.
Declaration
public ValidationSummary()
Fields
| Improve this Doc View SourceErrorStyleProperty
Identifies the ErrorStyle dependency property
Declaration
public static readonly DependencyProperty ErrorStyleProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
FilterProperty
Identifies the Filter dependency property
Declaration
public static readonly DependencyProperty FilterProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
FocusControlsOnClickProperty
Identifies the FocusControlsOnClick dependency property.
Declaration
public static readonly DependencyProperty FocusControlsOnClickProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
HasDisplayedErrorsProperty
Identifies the HasDisplayedErrors dependency property
Declaration
public static readonly DependencyProperty HasDisplayedErrorsProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
HasErrorsProperty
Identifies the HasErrors dependency property
Declaration
public static readonly DependencyProperty HasErrorsProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
HeaderProperty
Identifies the Header dependency property
Declaration
public static readonly DependencyProperty HeaderProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
HeaderTemplateProperty
Identifies the HeaderTemplate dependency property
Declaration
public static readonly DependencyProperty HeaderTemplateProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
ShowErrorsInSummaryProperty
Gets or sets a value indicating whether the field errors belonging to the input control should be shown in the ValidationSummary. Errors are added to the DisplayedErrors list depending on this flag. The base Errors list, however, will always contain all the errors.
Declaration
public static readonly DependencyProperty ShowErrorsInSummaryProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
SummaryListBoxStyleProperty
Identifies the SummaryListBoxStyle dependency property.
Declaration
public static readonly DependencyProperty SummaryListBoxStyleProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
TargetProperty
Identifies the Target dependency property.
Declaration
public static readonly DependencyProperty TargetProperty
Field Value
Type | Description |
---|---|
DependencyProperty |
Properties
| Improve this Doc View SourceDisplayedErrors
Gets the collection of errors that are displayed after the Filter is applied.
Declaration
public ReadOnlyObservableCollection<ValidationSummaryItem> DisplayedErrors { get; }
Property Value
Type | Description |
---|---|
ReadOnlyObservableCollection<ValidationSummaryItem> |
Errors
Gets the collection of errors.
Declaration
public ObservableCollection<ValidationSummaryItem> Errors { get; }
Property Value
Type | Description |
---|---|
ObservableCollection<ValidationSummaryItem> |
ErrorStyle
Gets or sets the style used for the error's item container.
Declaration
public Style ErrorStyle { get; set; }
Property Value
Type | Description |
---|---|
Style |
Filter
Gets or sets a value that indicates which types of errors are displayed.
Declaration
public ValidationSummaryFilters Filter { get; set; }
Property Value
Type | Description |
---|---|
ValidationSummaryFilters |
FocusControlsOnClick
Gets or sets a value that indicates whether focus is set on the input control when an error message is clicked.
Declaration
public bool FocusControlsOnClick { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasDisplayedErrors
Gets or sets a value that indicates whether the ValidationSummary has displayed errors.
Declaration
public bool HasDisplayedErrors { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
HasErrors
Gets or sets a value that indicates whether the ValidationSummary has errors.
Declaration
public bool HasErrors { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Header
Gets or sets the content of the ValidationSummary header.
Declaration
public object Header { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
HeaderTemplate
Gets or sets the template that is used to display the content of the header.
Declaration
public DataTemplate HeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
DataTemplate |
SummaryListBoxStyle
Gets or sets the style applied to the ListBox that displays the errors.
Declaration
public Style SummaryListBoxStyle { get; set; }
Property Value
Type | Description |
---|---|
Style |
Target
Gets or sets the UIElement for which validation errors will be displayed in the summary.
Declaration
public UIElement Target { get; set; }
Property Value
Type | Description |
---|---|
UIElement |
Methods
| Improve this Doc View SourceGetShowErrorsInSummary(DependencyObject)
Gets the ShowErrorsInSummary property of the specified DependencyObject.
Declaration
public static bool GetShowErrorsInSummary(DependencyObject inputControl)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | inputControl | The input control to get the ShowErrorsInSummary property from. |
Returns
Type | Description |
---|---|
System.Boolean | The value indicating whether errors on the input control should be shown. |
OnApplyTemplate()
When the template is applied, this loads all the template parts
Declaration
public override void OnApplyTemplate()
Overrides
| Improve this Doc View SourceOnCreateAutomationPeer()
Creates AutomationPeer (OnCreateAutomationPeer())
Declaration
protected override AutomationPeer OnCreateAutomationPeer()
Returns
Type | Description |
---|---|
AutomationPeer | The AutomationPeer associated with this ValidationSummary. |
Overrides
| Improve this Doc View SourceOnFocusingInvalidControl(FocusingInvalidControlEventArgs)
OnErrorClicked is invoked when an error in the ValidationSummary is clicked, via either the mouse or keyboard.
Declaration
protected virtual void OnFocusingInvalidControl(FocusingInvalidControlEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
FocusingInvalidControlEventArgs | e | The FocusingInvalidControlEventArgs for the event. |
SetShowErrorsInSummary(DependencyObject, Boolean)
Sets the ShowErrorsInSummary property of the specified DependencyObject.
Declaration
public static void SetShowErrorsInSummary(DependencyObject inputControl, bool value)
Parameters
Type | Name | Description |
---|---|---|
DependencyObject | inputControl | The input control with which to associate the specified dependency property. |
System.Boolean | value | The value indicating whether errors on the input control should be shown. |
Events
| Improve this Doc View SourceFocusingInvalidControl
Event triggered when an Error is clicked on.
Declaration
public event EventHandler<FocusingInvalidControlEventArgs> FocusingInvalidControl
Event Type
Type | Description |
---|---|
System.EventHandler<FocusingInvalidControlEventArgs> |
SelectionChanged
Event triggered when the selected error has changed.
Declaration
public event EventHandler<SelectionChangedEventArgs> SelectionChanged
Event Type
Type | Description |
---|---|
System.EventHandler<SelectionChangedEventArgs> |