Validation クラス
定義
データの検証をサポートするメソッドと添付プロパティを提供します。Provides methods and attached properties that support data validation.
public ref class Validation abstract sealed
public static class Validation
type Validation = class
Public Class Validation
- 継承
-
Validation
注釈
検証プロセスの詳細については、「データバインディングの概要」の「データの検証」を参照してください。For a detailed discussion of the validation process, see "Data Validation" in Data Binding Overview.
フィールド
ErrorEvent | |
ErrorsProperty |
Errors 添付プロパティを識別します。Identifies the Errors attached property. |
ErrorTemplateProperty |
ErrorTemplate 添付プロパティを識別します。Identifies the ErrorTemplate attached property. |
HasErrorProperty |
HasError 添付プロパティを識別します。Identifies the HasError attached property. |
ValidationAdornerSiteForProperty |
ValidationAdornerSiteFor 添付プロパティを識別します。Identifies the ValidationAdornerSiteFor attached property. |
ValidationAdornerSiteProperty |
ValidationAdornerSite 添付プロパティを識別します。Identifies the ValidationAdornerSite attached property. |
添付プロパティ
Errors |
バインドされている要素のアクティブなすべての ValidationError オブジェクトのコレクションを取得します。Gets the collection of all active ValidationError objects on the bound element. |
ErrorTemplate |
装飾層に対する検証エラーのフィードバックを生成するために使用する ControlTemplate を取得または設定します。Gets or sets the ControlTemplate used to generate validation error feedback on the adorner layer. |
HasError |
バインディング ターゲット要素に対するバインディングに ValidationError が存在するかどうかを示す値を取得します。Gets a value that indicates whether any binding on the binding target element has a ValidationError. |
ValidationAdornerSite |
このプロパティが設定されているバインドされた要素で発生した検証エラーを示すために表示される要素を取得または設定します。Gets or sets the element that appears to indicate that a validation error occurred on the bound element where this property is set. |
ValidationAdornerSiteFor |
エラーが発生したことを示すためにこの要素が表示される要素を取得または設定します。Gets or sets the element for which this element appears to indicate that an error occurred. |
メソッド
AddErrorHandler(DependencyObject, EventHandler<ValidationErrorEventArgs>) |
指定したオブジェクトに Error 添付イベントのイベント ハンドラーを追加します。Adds an event handler for the Error attached event to the specified object. |
ClearInvalid(BindingExpressionBase) |
指定された ValidationError オブジェクトから、すべての BindingExpressionBase オブジェクトを削除します。Removes all ValidationError objects from the specified BindingExpressionBase object. |
GetErrors(DependencyObject) |
指定された要素の Errors 添付プロパティの値を取得します。Gets the value of the Errors attached property of the specified element. |
GetErrorTemplate(DependencyObject) |
指定された要素の ErrorTemplate 添付プロパティの値を取得します。Gets the value of the ErrorTemplate attached property of the specified element. |
GetHasError(DependencyObject) |
指定された要素の HasError 添付プロパティの値を取得します。Gets the value of the HasError attached property of the specified element. |
GetValidationAdornerSite(DependencyObject) |
指定した要素の ValidationAdornerSite 添付プロパティの値を取得します。Gets the value of the ValidationAdornerSite attached property for the specified element. |
GetValidationAdornerSiteFor(DependencyObject) |
指定した要素の ValidationAdornerSiteFor 添付プロパティの値を取得します。Gets the value of the ValidationAdornerSiteFor attached property for the specified element. |
MarkInvalid(BindingExpressionBase, ValidationError) |
指定された BindingExpression オブジェクトで、指定された ValidationError オブジェクトを無効としてマークします。Marks the specified BindingExpression object as invalid with the specified ValidationError object. |
RemoveErrorHandler(DependencyObject, EventHandler<ValidationErrorEventArgs>) |
指定されたオブジェクトから Error 添付イベントのイベント ハンドラーを追加します。Adds an event handler for the Error attached event from the specified object. |
SetErrorTemplate(DependencyObject, ControlTemplate) |
指定した要素の ErrorTemplate 添付プロパティの値を設定します。Sets the value of the ErrorTemplate attached property to the specified element. |
SetValidationAdornerSite(DependencyObject, DependencyObject) |
指定された要素の ValidationAdornerSite 添付プロパティを指定された値に設定します。Sets the ValidationAdornerSite attached property to the specified value on the specified element. |
SetValidationAdornerSiteFor(DependencyObject, DependencyObject) |
指定された要素の ValidationAdornerSiteFor 添付プロパティを指定された値に設定します。Sets the ValidationAdornerSiteFor attached property to the specified value on the specified element. |
添付イベント
Error |
バインドされている要素で検証エラーが検出されると発生しますが、NotifyOnValidationError 値が |