Validation.ErrorTemplate 附加屬性

定義

取得或設定 用於 ControlTemplate 產生 adorner 層的驗證錯誤回饋。

see GetErrorTemplate, and SetErrorTemplate
see GetErrorTemplate, and SetErrorTemplate
see GetErrorTemplate, and SetErrorTemplate

備註

WPF 資料繫結模型可讓您建立 ValidationRulesBinding 物件的關聯。 如果使用者輸入了無效值,你可能需要針對應用程式使用者介面(UI)上的錯誤提供一些回饋。 提供此類回饋的一種方法是將 。ErrorTemplate附加屬性設定Validation為自訂 ControlTemplate

關於驗證的詳細討論,請參閱 資料綁定概述中的資料驗證章節。

相依財產資訊

項目 價值
識別碼欄位 ErrorTemplateProperty
元資料屬性設為 true IsNotDataBindable

適用於

另請參閱