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

UIElement 从中读取值的或 ContentElement 对象。

返回

ControlTemplate用于在装饰器层上生成验证错误反馈。

属性

例外

element如果是null

适用于