Partager via


ValidationSummaryItem Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Represents an individual validation error.

Inheritance Hierarchy

System.Object
  System.Windows.Controls.ValidationSummaryItem

Namespace:  System.Windows.Controls
Assembly:  System.Windows.Controls.Data.Input (in System.Windows.Controls.Data.Input.dll)

Syntax

'Declaration
Public Class ValidationSummaryItem _
    Implements INotifyPropertyChanged
public class ValidationSummaryItem : INotifyPropertyChanged

The ValidationSummaryItem type exposes the following members.

Constructors

  Name Description
Public method ValidationSummaryItem() Initializes a new instance of the ValidationSummaryItem class.
Public method ValidationSummaryItem(String) Initializes a new instance of the ValidationSummaryItem class with the specified error message.
Public method ValidationSummaryItem(String, String, ValidationSummaryItemType, ValidationSummaryItemSource, Object) Initializes a new instance of the ValidationSummaryItem class with the specified error message, header, item type, source, and context.

Top

Properties

  Name Description
Public property Context Gets or sets the object that is the context in which the error occurred.
Public property ItemType Gets a value that specifies whether the error originated from an object or a property.
Public property Message Gets or sets the text of the error message.
Public property MessageHeader Gets or sets the text of the error message header.
Public property Sources Gets the sources of the validation errors.

Top

Methods

  Name Description
Public method Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public method GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public method GetType Gets the Type of the current instance. (Inherited from Object.)
Protected method MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public method ToString The string representation of this ValidationSummaryItem. (Overrides Object.ToString().)

Top

Events

  Name Description
Public event PropertyChanged Occurs when a property value for this ValidationSummaryItem changes.

Top

Remarks

A ValidationSummaryItem tracks the error, the associated control, and the associated field.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.