MultiBinding.ValidationRules Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets the collection of ValidationRule objects for this instance of MultiBinding.
public:
property System::Collections::ObjectModel::Collection<System::Windows::Controls::ValidationRule ^> ^ ValidationRules { System::Collections::ObjectModel::Collection<System::Windows::Controls::ValidationRule ^> ^ get(); };
public System.Collections.ObjectModel.Collection<System.Windows.Controls.ValidationRule> ValidationRules { get; }
member this.ValidationRules : System.Collections.ObjectModel.Collection<System.Windows.Controls.ValidationRule>
Public ReadOnly Property ValidationRules As Collection(Of ValidationRule)
Property Value
The collection of ValidationRule objects for this instance of MultiBinding.
Remarks
You can set validation rules on both the MultiBinding object and the individual Binding objects in the MultiBinding object. The binding engine evaluates the ValidationRules on the MultiBinding object when a value moves from the binding target property to the IMultiValueConverter object. After that, when a value moves from the converter to the binding source property of an individual binding, the binding engine evaluates the ValidationRules on that Binding object.
For more information about the validation process and how to provide visual feedback upon invalidation, see "Data Validation" in Data Binding Overview.
Note
This property can be set in Extensible Application Markup Language (XAML) only by using the syntax shown, or by accessing the collection object and using its various methods, such as Add
. The property used to access the collection object is read-only, whereas the collection itself is read-write.
XAML Property Element Usage
<object>
<object.ValidationRules>
oneOrMoreValidationRules
</object.ValidationRules>
</object>
XAML Values
oneOrMoreValidationRules
One or more ValidationRule objects. You can use the ExceptionValidationRule class or create your custom rules by subclassing the ValidationRule class.
Applies to
See also
.NET
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기