Click here to Skip to main content
15,885,278 members
Articles / Desktop Programming / WPF

Wpf ErrorProvider - Integrating IDataErrorInfo, WPF, and the Validation Application Block (VAB)

Rate me:
Please Sign up or sign in to vote.
2.14/5 (5 votes)
22 Sep 2008CPOL6 min read 63.8K   2.8K   26  
A WPF validation control integrated with VAB and IDataErrorInfo.
<?xml version="1.0"?>
<doc>
<assembly>
<name>
ErrorProvider
</name>
</assembly>
<members>
<member name="M:Rahul.Wpf.Controls.ErrorProvider.ErrorProvider_Loaded(System.Object,System.Windows.RoutedEventArgs)">
	<summary>
 Called when this component is loaded. We have a call to Validate here that way errors appear from the very 
 moment the page or form is visible.
 </summary>
</member><member name="M:Rahul.Wpf.Controls.ErrorProvider.ErrorProvider_DataContextChanged(System.Object,System.Windows.DependencyPropertyChangedEventArgs)">
	<summary>
 Called when our DataContext changes
 </summary>
</member><member name="M:Rahul.Wpf.Controls.ErrorProvider.validate">
	<summary>
 Validates all properties on the current data source.
 </summary>
	<returns>True if there are no errors displayed, otherwise false.</returns>
	<remarks>
 Note that only errors on properties that are displayed are included. Other errors, such as errors for properties that are not displayed, 
 will not be validated by this method.
 </remarks>
</member><member name="M:Rahul.Wpf.Controls.ErrorProvider.validate(System.String)">
	<summary>
 Validates the Passed Property on the current data source.
 </summary>
	<returns>True if there are no errors displayed, otherwise false.</returns>
	<remarks>
 Note that only errors on properties that are displayed are included. Other errors, such as errors for properties that are not displayed, 
 will not be validated by this method.
 </remarks>
</member><member name="M:Rahul.Wpf.Controls.ErrorProvider.validate(System.Windows.DependencyObject)">
	<summary>
 Validates ErrorProvider children beginning at the specified Child Object.
 </summary>
	<param name="childObject">The child object from where to begin validation.</param>
	<returns>True if there are no errors displayed, otherwise false.</returns>
	<remarks>
 Note that only errors on properties that are displayed are included. Other errors, such as errors for properties that are not displayed, 
 will not be validated by this method.
 </remarks>
</member><member name="M:Rahul.Wpf.Controls.ErrorProvider.getFirstInvalidElement">
	<summary>
 Returns the first element that this error provider has labelled as invalid. This method 
 is useful to set the users focus on the first visible error field on a page.
 </summary>
</member><member name="M:Rahul.Wpf.Controls.ErrorProvider.clear">
	<summary>
 Clears any error messages
 </summary>
</member><member name="F:Rahul.Wpf.Controls.ErrorProvider.BindingOverrideProperty">
	<summary>
 For convenience, the ErrorProvider will use the element binding to determine the owner type of
 the property being validated.  If for some reason that does not work appropriately for your
 situation, this BindingOverride property can be used to force this ErrorProvider to use the indicated
 OwnerType and PropertyPath, and OwnerRelativeSource.
 </summary>
</member><member name="F:Rahul.Wpf.Controls.ErrorProvider.IsObjectValidationProperty">
	<summary>
 Indicates whether this ErrorProvider validates an object, and not a property.
 </summary>
</member><member name="M:Rahul.Wpf.Controls.ErrorProvider.clearInternal">
	<summary>
 Clears any error messages and returns a list of all bindings on the current form/page. This is simply so 
 it can be reused by the Validate method.
 </summary>
	<remarks></remarks>
</member><member name="M:Rahul.Wpf.Controls.ErrorProvider.DataContext_PropertyChanged(System.Object,System.ComponentModel.PropertyChangedEventArgs)">
	<summary>
 Called when the PropertyChanged event is raised from the object we are bound to - that is, our data context.
 </summary>
</member><member name="M:Rahul.Wpf.Controls.ErrorProvider.findBindingsRecursively(System.Windows.DependencyObject,System.String,Rahul.Wpf.Controls.ErrorProvider.BindingFoundCallbackDelegate,System.Object@)">
	<summary>
 Recursively goes through the control tree, looking for bindings on the current data context.
 </summary>
	<param name="element">The root element to start searching at.</param>
	<param name="callbackDelegate">A delegate called when a binding if found.</param>
</member><member name="M:Rahul.Common.Entities.BusinessObjectBase`1.getValidationAttributes(System.String,System.Type[])">
	<param name="types">An array of System.Type objects representing the number, order, and type of the parameters for the indexed property to get.  -or- An empty array of the type System.Type (that is, Type[] types = new Type[0]) to get a property that is not indexed.</param>
</member><member name="M:Rahul.Common.Entities.BusinessObjectBase`1.getValidator(System.String,System.String,Microsoft.Practices.EnterpriseLibrary.Common.Configuration.IConfigurationSource,System.Type[])">
	<param name="types">An array of System.Type objects representing the number, order, and type of the parameters for the indexed property to get.  -or- An empty array of the type System.Type (that is, Type[] types = new Type[0]) to get a property that is not indexed.</param>
</member><member name="M:Rahul.Common.Entities.BusinessObjectBase`1.validateProperty(System.String,System.String,Microsoft.Practices.EnterpriseLibrary.Validation.ValidationSpecificationSource,System.Type[],System.Object[])">
	<param name="types">An array of System.Type objects representing the number, order, and type of the parameters for the indexed property to get.  -or- An empty array of the type System.Type (that is, Type[] types = new Type[0]) to get a property that is not indexed.</param>
	<param name="index">Optional index values for indexed properties. This value should be null for non-indexed properties.</param>
</member><member name="T:Rahul.Common.Entities.Net35.PropertyMappedValidatorValueAccessBuilder">
	<summary>
 This helper class was copied from the ASP.NET VAB integration.
 </summary>
</member><member name="T:Rahul.Common.Entities.Net35.PropertyMappedValidatorValueAccess">
	<summary>
 This helper class was copied from the ASP.NET VAB integration.
 </summary>
</member><member name="P:Rahul.My.MyWpfExtension.Application">
	<summary>
 Returns the application object for the running application
 </summary>
</member><member name="P:Rahul.My.MyWpfExtension.Computer">
	<summary>
 Returns information about the host computer.
 </summary>
</member><member name="P:Rahul.My.MyWpfExtension.User">
	<summary>
 Returns information for the current user.  If you wish to run the application with the current 
 Windows user credentials, call My.User.InitializeWithWindowsUser().
 </summary>
</member><member name="P:Rahul.My.MyWpfExtension.Log">
	<summary>
 Returns the application log. The listeners can be configured by the application's configuration file.
 </summary>
</member><member name="P:Rahul.My.MyWpfExtension.Windows">
	<summary>
 Returns the collection of Windows defined in the project.
 </summary>
</member><member name="T:Rahul.My.MyWpfExtension">
	<summary>
 Module used to define the properties that are available in the My Namespace for WPF
 </summary>
	<remarks></remarks>
</member><member name="P:Rahul.My.Resources.Resources.ResourceManager">
	<summary>
  Returns the cached ResourceManager instance used by this class.
</summary>
</member><member name="P:Rahul.My.Resources.Resources.Culture">
	<summary>
  Overrides the current thread's CurrentUICulture property for all
  resource lookups using this strongly typed resource class.
</summary>
</member><member name="T:Rahul.My.Resources.Resources">
	<summary>
  A strongly-typed resource class, for looking up localized strings, etc.
</summary>
</member><member name="P:Rahul.Common.Entities.Net35.EnterpriseValidationRule.SourceTypeName">
	<summary>
 Gets or sets the name of the type to use a source for validation specifications.
 </summary>
</member><member name="P:Rahul.Common.Entities.Net35.EnterpriseValidationRule.PropertyName">
	<summary>
 Gets or sets the name of the property to use as source for validation specifications.
 </summary>
</member><member name="P:Rahul.Common.Entities.Net35.EnterpriseValidationRule.RulesetName">
	<summary>
 Gets or sets the name of the ruleset to use when retrieving validation specifications.
 </summary>
</member><member name="P:Rahul.Common.Entities.Net35.EnterpriseValidationRule.ValidationSpecificationSource">
	<summary>
 Gets or sets the <see cref="P:Rahul.Common.Entities.Net35.EnterpriseValidationRule.ValidationSpecificationSource"/> indicating where to get validation specifications from.
 </summary>
</member><member name="E:Rahul.Common.Entities.Net35.EnterpriseValidationRule.ValueConvert">
	<summary>
 Occurs when value conversion is required by the control to perform validation.
 </summary>
	<remarks>
 The ValueConvert event is raised when value conversion is required by the control to perform validation. 
 me event is used to provide a custom value conversion routine for an input control, 
 such as a <see cref="T:System.Windows.Controls.TextBox"/> control.
 </remarks>
	<seealso cref="T:Microsoft.Practices.EnterpriseLibrary.Validation.Integration.ValueConvertEventArgs"/>
</member><member name="T:Rahul.Common.Entities.Net35.EnterpriseValidationRule">
	<summary>
 The EnterpriseValidationRule integrates WPF with the Validation Application Block (VAB) of Enterprise Library 3.0.
 It is similar to the VAB ASP.NET integration's PropertyProxyValidator but implements a 
 WPF ValidationRule instead of an ASP.NET BaseValidator.
 An ErrorProvider can be used to conveniently initialize EnterpriseValidationRules.
 </summary>
</member><member name="T:Rahul.Wpf.Controls.BindingOverride">
	<summary>
 Defines the type used by the BindingOverrideProperty in the ErrorProvider.
 </summary>
</member><member name="T:Rahul.Wpf.Controls.BindingOverrideExtension">
	<summary>
 A MarkupExtension for the BindingOverride used in the ErrorProvider.
 </summary>
</member>
</members>
</doc>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
India India
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions