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
- FilterableAttribute.cs
- LocalBuilder.cs
- SmiEventSink_Default.cs
- Visual.cs
- ImageSourceValueSerializer.cs
- OracleSqlParser.cs
- XmlIlGenerator.cs
- _ServiceNameStore.cs
- ChangeProcessor.cs
- RegexInterpreter.cs
- Int32Animation.cs
- XmlReflectionMember.cs
- AppDomainShutdownMonitor.cs
- SmiRequestExecutor.cs
- FunctionNode.cs
- BufferBuilder.cs
- CustomErrorsSectionWrapper.cs
- DataRowChangeEvent.cs
- ScriptResourceHandler.cs
- ThrowHelper.cs
- NextPreviousPagerField.cs
- ProfilePropertyNameValidator.cs
- MouseGestureConverter.cs
- RawContentTypeMapper.cs
- TableProviderWrapper.cs
- ForAllOperator.cs
- QEncodedStream.cs
- LinkDesigner.cs
- CodeMethodReturnStatement.cs
- WebPartConnectionsCloseVerb.cs
- EventPropertyMap.cs
- ListViewDeletedEventArgs.cs
- PenThreadWorker.cs
- OLEDB_Util.cs
- WindowsGraphics2.cs
- ByteRangeDownloader.cs
- XmlValidatingReaderImpl.cs
- NameSpaceExtractor.cs
- CopyCodeAction.cs
- PhysicalFontFamily.cs
- OdbcDataReader.cs
- HtmlInputHidden.cs
- RegistrationServices.cs
- DictionaryEntry.cs
- InternalTypeHelper.cs
- Component.cs
- DetailsViewDeleteEventArgs.cs
- DependencyObjectCodeDomSerializer.cs
- TargetControlTypeCache.cs
- CustomWebEventKey.cs
- AssemblyEvidenceFactory.cs
- DataPagerFieldItem.cs
- SqlEnums.cs
- MouseDevice.cs
- TextElementAutomationPeer.cs
- SettingsPropertyCollection.cs
- RelativeSource.cs
- WebMessageEncodingElement.cs
- OperationResponse.cs
- FileVersion.cs
- _MultipleConnectAsync.cs
- LeaseManager.cs
- XPathParser.cs
- WrappedOptions.cs
- ThrowHelper.cs
- BidirectionalDictionary.cs
- _FtpControlStream.cs
- ActivityTypeDesigner.xaml.cs
- WebPartMenu.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- TableLayout.cs
- ManagementObjectSearcher.cs
- ButtonRenderer.cs
- AutoFocusStyle.xaml.cs
- SoundPlayerAction.cs
- XXXOnTypeBuilderInstantiation.cs
- StoryFragments.cs
- SpeechEvent.cs
- ExceptionTrace.cs
- ScriptingSectionGroup.cs
- BulletedList.cs
- MemberHolder.cs
- AlphabeticalEnumConverter.cs
- Int64Converter.cs
- StretchValidation.cs
- HashSetEqualityComparer.cs
- ValidationErrorCollection.cs
- ValidationPropertyAttribute.cs
- NameGenerator.cs
- DecimalConverter.cs
- ConstraintStruct.cs
- TimerElapsedEvenArgs.cs
- AxisAngleRotation3D.cs
- SynchronizedReadOnlyCollection.cs
- TextBox.cs
- WindowCollection.cs
- XmlSchemaAttribute.cs
- AnchoredBlock.cs
- SmtpDigestAuthenticationModule.cs
- SchemaTypeEmitter.cs