Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / ValidationRule.cs / 1305600 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MetadataPropertyCollection.cs
- UriExt.cs
- ManagementOperationWatcher.cs
- VolatileEnlistmentMultiplexing.cs
- FamilyTypefaceCollection.cs
- SR.cs
- HtmlSelect.cs
- BitmapEffectGroup.cs
- SystemTcpStatistics.cs
- SymbolType.cs
- BackgroundWorker.cs
- Point3DAnimation.cs
- SqlRecordBuffer.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ComplexBindingPropertiesAttribute.cs
- CompositeCollectionView.cs
- XpsFilter.cs
- AnimationTimeline.cs
- OleDbError.cs
- _NegotiateClient.cs
- PackageStore.cs
- UnsafeNativeMethodsPenimc.cs
- SHA512.cs
- CodeCompiler.cs
- EncryptedType.cs
- TableParagraph.cs
- Geometry.cs
- ThumbAutomationPeer.cs
- MembershipValidatePasswordEventArgs.cs
- SystemKeyConverter.cs
- GenerateScriptTypeAttribute.cs
- MethodBody.cs
- Scripts.cs
- FilteredXmlReader.cs
- SliderAutomationPeer.cs
- DropTarget.cs
- ClientConfigurationSystem.cs
- Translator.cs
- WindowsImpersonationContext.cs
- SQLInt16.cs
- SessionSwitchEventArgs.cs
- ParseNumbers.cs
- SvcMapFile.cs
- BinaryCommonClasses.cs
- ObjectNotFoundException.cs
- CompModHelpers.cs
- MarkupObject.cs
- UInt64.cs
- VectorConverter.cs
- ContextProperty.cs
- CaseInsensitiveHashCodeProvider.cs
- TablePattern.cs
- RayMeshGeometry3DHitTestResult.cs
- EncodingInfo.cs
- ToReply.cs
- PseudoWebRequest.cs
- ExecutionContext.cs
- DoubleUtil.cs
- IDictionary.cs
- CodeGeneratorAttribute.cs
- RegexWriter.cs
- AccessDataSourceWizardForm.cs
- ApplySecurityAndSendAsyncResult.cs
- ProfileServiceManager.cs
- XslVisitor.cs
- QilGenerator.cs
- GiveFeedbackEventArgs.cs
- IPAddressCollection.cs
- ClassValidator.cs
- UnsafeNativeMethods.cs
- DesignerCommandAdapter.cs
- NotifyInputEventArgs.cs
- Exceptions.cs
- CompiledQueryCacheKey.cs
- storagemappingitemcollection.viewdictionary.cs
- DesignerAutoFormatStyle.cs
- dbdatarecord.cs
- ExtenderProvidedPropertyAttribute.cs
- Version.cs
- SynchronizedMessageSource.cs
- FileChangeNotifier.cs
- UnsafeNativeMethods.cs
- DynamicMethod.cs
- CharUnicodeInfo.cs
- BigIntegerStorage.cs
- MetadataCacheItem.cs
- WebScriptServiceHostFactory.cs
- VerticalAlignConverter.cs
- DataServiceResponse.cs
- CallbackDebugBehavior.cs
- CopyNamespacesAction.cs
- AsyncOperation.cs
- PageTheme.cs
- ZipIOLocalFileDataDescriptor.cs
- DocumentApplicationJournalEntry.cs
- FloaterParagraph.cs
- ByteStreamMessageEncoder.cs
- FileLevelControlBuilderAttribute.cs
- OdbcConnection.cs
- SelectionChangedEventArgs.cs