ValidationRules Property

MultiBinding.ValidationRules Property

Gets the collection of ValidationRule objects for this instance of MultiBinding.

Namespace: System.Windows.Data
Assembly: PresentationFramework (in presentationframework.dll)
XML Namespace:  http://schemas.microsoft.com/winfx/2006/xaml/presentation

public Collection<ValidationRule> ValidationRules { get; }
/** @property */
public Collection<ValidationRule> get_ValidationRules ()

public function get ValidationRules () : Collection<ValidationRule>

<object>
  <object.ValidationRules>
    oneOrMoreValidationRules
  </object.ValidationRules>
</object>
 oneOrMoreValidationRules  One or more ValidationRule objects. You can use the ExceptionValidationRule class or create your custom rules by subclassing the ValidationRule class. 

Property Value

The collection of ValidationRule objects for this instance of MultiBinding.

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.

NoteNote:

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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2016 Microsoft