共用方式為


Validation.GetErrors(DependencyObject) 方法

定義

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

public:
 static System::Collections::ObjectModel::ReadOnlyObservableCollection<System::Windows::Controls::ValidationError ^> ^ GetErrors(System::Windows::DependencyObject ^ element);
public static System.Collections.ObjectModel.ReadOnlyObservableCollection<System.Windows.Controls.ValidationError> GetErrors (System.Windows.DependencyObject element);
static member GetErrors : System.Windows.DependencyObject -> System.Collections.ObjectModel.ReadOnlyObservableCollection<System.Windows.Controls.ValidationError>
Public Shared Function GetErrors (element As DependencyObject) As ReadOnlyObservableCollection(Of ValidationError)

參數

element
DependencyObject

要從中讀取值的 UIElementContentElement 物件。

傳回

ReadOnlyObservableCollection<ValidationError>

ReadOnlyObservableCollection<T> 物件的 ValidationError

例外狀況

如果 elementnull

適用於