Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // //// 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
- ProjectionCamera.cs
- SpellerHighlightLayer.cs
- Exception.cs
- LocalizationComments.cs
- XmlSchemaComplexContent.cs
- SqlDataSourceEnumerator.cs
- Rijndael.cs
- ChannelManager.cs
- TransformerInfo.cs
- DeferredReference.cs
- XmlStringTable.cs
- SecurityContextTokenValidationException.cs
- x509utils.cs
- CodeExpressionStatement.cs
- TypeConverter.cs
- SelectedGridItemChangedEvent.cs
- FileStream.cs
- Menu.cs
- WebPartUtil.cs
- FileDialog.cs
- Stackframe.cs
- JournalEntryListConverter.cs
- SubclassTypeValidator.cs
- ActivityScheduledQuery.cs
- ListMarkerLine.cs
- HScrollBar.cs
- GraphicsContext.cs
- RegistryConfigurationProvider.cs
- Vector3DAnimation.cs
- PenContexts.cs
- WSFederationHttpSecurity.cs
- WrappedIUnknown.cs
- SocketException.cs
- FixedDocumentSequencePaginator.cs
- DataObject.cs
- SerialStream.cs
- AspNetSynchronizationContext.cs
- SmtpMail.cs
- QuaternionConverter.cs
- OutputCacheSection.cs
- StylusButton.cs
- DefaultTraceListener.cs
- ToolboxBitmapAttribute.cs
- XmlILConstructAnalyzer.cs
- ReadOnlyMetadataCollection.cs
- BitArray.cs
- LongValidator.cs
- querybuilder.cs
- LessThan.cs
- DataGridViewRowStateChangedEventArgs.cs
- RowVisual.cs
- CompilerGlobalScopeAttribute.cs
- SyndicationFeedFormatter.cs
- IdentityValidationException.cs
- ListViewGroupConverter.cs
- CodeTypeReferenceSerializer.cs
- EventLogPermission.cs
- DirectionalLight.cs
- EntityDataSourceQueryBuilder.cs
- ServiceBusyException.cs
- PointConverter.cs
- XmlTextEncoder.cs
- DataFormats.cs
- Html32TextWriter.cs
- IMembershipProvider.cs
- AssertFilter.cs
- XmlParserContext.cs
- WebContext.cs
- LightweightCodeGenerator.cs
- Compiler.cs
- PropertyEntry.cs
- UpdateManifestForBrowserApplication.cs
- Base64Encoder.cs
- AuthenticationService.cs
- AssemblyInfo.cs
- MatcherBuilder.cs
- Group.cs
- MethodImplAttribute.cs
- IndentTextWriter.cs
- IndentTextWriter.cs
- ScrollViewerAutomationPeer.cs
- translator.cs
- ProfileBuildProvider.cs
- StaticResourceExtension.cs
- SimpleHandlerBuildProvider.cs
- ConfigurationStrings.cs
- UnaryNode.cs
- DbReferenceCollection.cs
- FilterQuery.cs
- ExtenderProvidedPropertyAttribute.cs
- XmlSchemaCollection.cs
- ExceptionAggregator.cs
- AmbientValueAttribute.cs
- RectIndependentAnimationStorage.cs
- CommandBinding.cs
- HtmlElement.cs
- SafeUserTokenHandle.cs
- SubpageParagraph.cs
- HorizontalAlignConverter.cs
- CodeLinePragma.cs