Validation.GetErrorTemplate(DependencyObject) 方法

定義

取得所指定項目的 ErrorTemplate 附加屬性值。

public:
 static System::Windows::Controls::ControlTemplate ^ GetErrorTemplate(System::Windows::DependencyObject ^ element);
[System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))]
public static System.Windows.Controls.ControlTemplate GetErrorTemplate (System.Windows.DependencyObject element);
[<System.Windows.AttachedPropertyBrowsableForType(typeof(System.Windows.DependencyObject))>]
static member GetErrorTemplate : System.Windows.DependencyObject -> System.Windows.Controls.ControlTemplate
Public Shared Function GetErrorTemplate (element As DependencyObject) As ControlTemplate

參數

element
DependencyObject

要從中讀取值的 UIElementContentElement 物件。

傳回

ControlTemplate

用於裝飾項層上產生驗證錯誤回應的 ControlTemplate

屬性

例外狀況

如果 elementnull

適用於