Class ValidationSummaryItem
Represents an individual validation error.
Inheritance
Namespace: System.Windows.Controls
Assembly: Controls.Data.Input.OpenSilver.dll
Syntax
public class ValidationSummaryItem : INotifyPropertyChanged
Constructors
| Improve this Doc View SourceValidationSummaryItem()
Initializes a new instance of the ValidationSummaryItem class.
Declaration
public ValidationSummaryItem()
ValidationSummaryItem(String)
Initializes a new instance of the ValidationSummaryItem class.
Declaration
public ValidationSummaryItem(string message)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message. |
ValidationSummaryItem(String, String, ValidationSummaryItemType, ValidationSummaryItemSource, Object)
Initializes a new instance of the ValidationSummaryItem class.
Declaration
public ValidationSummaryItem(string message, string messageHeader, ValidationSummaryItemType itemType, ValidationSummaryItemSource source, object context)
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The error message. |
System.String | messageHeader | The header/prefix of the item, such as the property name. |
ValidationSummaryItemType | itemType | The type of error, such as Property or Entity level. |
ValidationSummaryItemSource | source | The source of the error message, including the originating control and/or property name. |
System.Object | context | Context from which the error occurred. This general property can be used as a container to keep track of the entity, for instance. |
Properties
| Improve this Doc View SourceContext
Gets or sets the object that is the context in which the error occurred.
Declaration
public object Context { get; set; }
Property Value
Type | Description |
---|---|
System.Object |
ItemType
Gets a value that specifies whether the error originated from an object or a property.
Declaration
public ValidationSummaryItemType ItemType { get; set; }
Property Value
Type | Description |
---|---|
ValidationSummaryItemType |
Message
Gets or sets the text of the error message.
Declaration
public string Message { get; set; }
Property Value
Type | Description |
---|---|
System.String |
MessageHeader
Gets the reference to the input control that resulted in this error
Declaration
public string MessageHeader { get; set; }
Property Value
Type | Description |
---|---|
System.String |
Sources
Gets the sources of the error.
Declaration
public ObservableCollection<ValidationSummaryItemSource> Sources { get; }
Property Value
Type | Description |
---|---|
ObservableCollection<ValidationSummaryItemSource> |
Methods
| Improve this Doc View SourceToString()
The string representation of the error.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | The string representation of the ValidationSummaryItem. |
Events
| Improve this Doc View SourcePropertyChanged
This event is raised when any of the properties on the object change
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
Type | Description |
---|---|
PropertyChangedEventHandler |