Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / wpf / src / Framework / System / Windows / Controls / ValidationRule.cs / 1 / ValidationRule.cs
//---------------------------------------------------------------------------- // //// Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // // // // Description: // ValidationRule is a member of ValidationRules Collection. // ValidationRulesCollection is a collection of ValidationRule // instances on either a Binding or a MultiBinding. Each of the ValidationRules' // Validate is checked for validity on update // // // See specs at http://avalon/connecteddata/Specs/Validation.mht // // History: // 5/3/2004 mharper: created. // //--------------------------------------------------------------------------- using System; using System.Globalization; namespace System.Windows.Controls { ////// ValidationRule is a member of ValidationRules Collection. /// ValidationRulesCollection is a collection of ValidationRule /// instances on either a Binding or a MultiBinding. Each of the ValidationRules' /// Validate is checked for validity on update /// public abstract class ValidationRule { ////// Initialize a new instance of ValidationRule. /// // protected ValidationRule() : this(ValidationStep.RawProposedValue, false) { } ////// Initialize a new instance of ValidationRule with the given validation /// step and target-update behavior. /// protected ValidationRule(ValidationStep validationStep, bool validatesOnTargetUpdated) { _validationStep = validationStep; _validatesOnTargetUpdated = validatesOnTargetUpdated; } ////// Validate is called when Data binding is updating /// public abstract ValidationResult Validate(object value, CultureInfo cultureInfo); ////// The step at which the rule should be called. /// public ValidationStep ValidationStep { get { return _validationStep; } set { _validationStep = value; } } ////// When true, the validation rule is also called during source-to-target data /// transfer. This allows invalid data in the source to be highlighted /// as soon as it appears in the UI, without waiting for the user to edit it. /// public bool ValidatesOnTargetUpdated { get { return _validatesOnTargetUpdated; } set { _validatesOnTargetUpdated = value; } } ValidationStep _validationStep; bool _validatesOnTargetUpdated; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. //---------------------------------------------------------------------------- // //// Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // // // // Description: // ValidationRule is a member of ValidationRules Collection. // ValidationRulesCollection is a collection of ValidationRule // instances on either a Binding or a MultiBinding. Each of the ValidationRules' // Validate is checked for validity on update // // // See specs at http://avalon/connecteddata/Specs/Validation.mht // // History: // 5/3/2004 mharper: created. // //--------------------------------------------------------------------------- using System; using System.Globalization; namespace System.Windows.Controls { ////// ValidationRule is a member of ValidationRules Collection. /// ValidationRulesCollection is a collection of ValidationRule /// instances on either a Binding or a MultiBinding. Each of the ValidationRules' /// Validate is checked for validity on update /// public abstract class ValidationRule { ////// Initialize a new instance of ValidationRule. /// // protected ValidationRule() : this(ValidationStep.RawProposedValue, false) { } ////// Initialize a new instance of ValidationRule with the given validation /// step and target-update behavior. /// protected ValidationRule(ValidationStep validationStep, bool validatesOnTargetUpdated) { _validationStep = validationStep; _validatesOnTargetUpdated = validatesOnTargetUpdated; } ////// Validate is called when Data binding is updating /// public abstract ValidationResult Validate(object value, CultureInfo cultureInfo); ////// The step at which the rule should be called. /// public ValidationStep ValidationStep { get { return _validationStep; } set { _validationStep = value; } } ////// When true, the validation rule is also called during source-to-target data /// transfer. This allows invalid data in the source to be highlighted /// as soon as it appears in the UI, without waiting for the user to edit it. /// public bool ValidatesOnTargetUpdated { get { return _validatesOnTargetUpdated; } set { _validatesOnTargetUpdated = value; } } ValidationStep _validationStep; bool _validatesOnTargetUpdated; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RenamedEventArgs.cs
- DataMisalignedException.cs
- AssemblyAttributes.cs
- DataControlField.cs
- HiddenField.cs
- RoutedEventConverter.cs
- RemotingSurrogateSelector.cs
- TransportSecurityProtocol.cs
- SafeRightsManagementHandle.cs
- Odbc32.cs
- XmlElementCollection.cs
- Canvas.cs
- LateBoundBitmapDecoder.cs
- XmlSchemaInclude.cs
- HighlightVisual.cs
- HttpCachePolicy.cs
- ThreadTrace.cs
- XslException.cs
- SamlAuthenticationClaimResource.cs
- ScrollBar.cs
- EditorResources.cs
- XmlRootAttribute.cs
- AsyncCompletedEventArgs.cs
- MaxMessageSizeStream.cs
- CachedBitmap.cs
- WorkflowItemsPresenter.cs
- LinearKeyFrames.cs
- TextPattern.cs
- TreeView.cs
- StateMachineWorkflow.cs
- StreamGeometry.cs
- LOSFormatter.cs
- DataSetMappper.cs
- Point3D.cs
- DataGridItemEventArgs.cs
- InputProviderSite.cs
- SerializeAbsoluteContext.cs
- XsdBuildProvider.cs
- CompilationRelaxations.cs
- ResolveCriteria11.cs
- CodeMemberProperty.cs
- ObjectConverter.cs
- EdmSchemaAttribute.cs
- GridViewRowCollection.cs
- AutomationProperty.cs
- unitconverter.cs
- DataViewManagerListItemTypeDescriptor.cs
- Visitors.cs
- FilteredAttributeCollection.cs
- CallbackValidatorAttribute.cs
- EventNotify.cs
- XmlSchemaAnnotation.cs
- PrePostDescendentsWalker.cs
- HMACSHA384.cs
- TheQuery.cs
- CompositeControlDesigner.cs
- XmlTypeAttribute.cs
- PageContent.cs
- EntityDataSourceColumn.cs
- OLEDB_Util.cs
- SvcMapFile.cs
- CaseInsensitiveHashCodeProvider.cs
- ObjectStorage.cs
- Model3DCollection.cs
- WebServiceBindingAttribute.cs
- XpsResourcePolicy.cs
- DataDocumentXPathNavigator.cs
- BitmapEffectGroup.cs
- ReferenceConverter.cs
- GeneralTransform3DGroup.cs
- BaseTemplateCodeDomTreeGenerator.cs
- UniqueIdentifierService.cs
- TextEditorMouse.cs
- ApplicationFileCodeDomTreeGenerator.cs
- xamlnodes.cs
- QueryOptionExpression.cs
- RemoteDebugger.cs
- ButtonFieldBase.cs
- ConnectionsZone.cs
- RegionIterator.cs
- ConfigXmlCDataSection.cs
- _ContextAwareResult.cs
- OledbConnectionStringbuilder.cs
- PtsPage.cs
- XmlNotation.cs
- ReachDocumentReferenceCollectionSerializerAsync.cs
- SharedDp.cs
- AppSettingsExpressionBuilder.cs
- XamlBrushSerializer.cs
- BamlTreeUpdater.cs
- DiscoveryOperationContext.cs
- AttributeAction.cs
- FormsAuthenticationUser.cs
- TextRunCacheImp.cs
- EventDescriptorCollection.cs
- PeerFlooder.cs
- DataControlFieldCollection.cs
- MarshalByRefObject.cs
- DLinqColumnProvider.cs
- ObjectSecurityT.cs