Validation.SetErrorTemplate(DependencyObject, ControlTemplate) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將附加屬性的值 ErrorTemplate 設定為指定元素。
public:
static void SetErrorTemplate(System::Windows::DependencyObject ^ element, System::Windows::Controls::ControlTemplate ^ value);
public static void SetErrorTemplate(System.Windows.DependencyObject element, System.Windows.Controls.ControlTemplate value);
static member SetErrorTemplate : System.Windows.DependencyObject * System.Windows.Controls.ControlTemplate -> unit
Public Shared Sub SetErrorTemplate (element As DependencyObject, value As ControlTemplate)
參數
- element
- DependencyObject
要UIElement設定ContentElement的 or value 物件。
- value
- ControlTemplate
使用 來 ControlTemplate 產生 adorner 層的驗證錯誤反饋。
例外狀況
若 element 是 null。