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
- RecognizerStateChangedEventArgs.cs
- Clock.cs
- Timer.cs
- coordinator.cs
- DisplayNameAttribute.cs
- Util.cs
- DbConnectionStringCommon.cs
- DefaultParameterValueAttribute.cs
- ActivityXRefConverter.cs
- COM2FontConverter.cs
- XmlEncodedRawTextWriter.cs
- LightweightEntityWrapper.cs
- XslException.cs
- HostedController.cs
- CreateParams.cs
- NamedObject.cs
- CreatingCookieEventArgs.cs
- FacetValueContainer.cs
- TextAnchor.cs
- TypeInitializationException.cs
- altserialization.cs
- SocketManager.cs
- AnimationStorage.cs
- HtmlInputPassword.cs
- ContextStaticAttribute.cs
- ExceptionNotification.cs
- BrowsableAttribute.cs
- SafeViewOfFileHandle.cs
- HttpListenerResponse.cs
- TraceLevelStore.cs
- Rect3DValueSerializer.cs
- Rectangle.cs
- RC2CryptoServiceProvider.cs
- MarkedHighlightComponent.cs
- BamlRecordHelper.cs
- BroadcastEventHelper.cs
- RijndaelManagedTransform.cs
- GcSettings.cs
- OleDbInfoMessageEvent.cs
- safex509handles.cs
- OutputScopeManager.cs
- OdbcErrorCollection.cs
- InsufficientExecutionStackException.cs
- MulticastDelegate.cs
- ModelFactory.cs
- OutOfProcStateClientManager.cs
- ColorInterpolationModeValidation.cs
- CaseCqlBlock.cs
- HiddenFieldPageStatePersister.cs
- AlphabeticalEnumConverter.cs
- ByteAnimation.cs
- MouseButtonEventArgs.cs
- Cloud.cs
- EnumBuilder.cs
- WorkItem.cs
- TableLayoutPanelCellPosition.cs
- UrlParameterReader.cs
- TextCollapsingProperties.cs
- Mutex.cs
- Int64KeyFrameCollection.cs
- updateconfighost.cs
- ProbeMatchesMessageCD1.cs
- ExportException.cs
- ScriptingSectionGroup.cs
- WebPartHelpVerb.cs
- GuidConverter.cs
- InternalResources.cs
- SpeakProgressEventArgs.cs
- LayoutEditorPart.cs
- LinqDataView.cs
- AutoCompleteStringCollection.cs
- DefaultPrintController.cs
- EntityDataSourceEntitySetNameItem.cs
- InternalMappingException.cs
- BlurBitmapEffect.cs
- XappLauncher.cs
- OutputCacheProfile.cs
- Matrix3DValueSerializer.cs
- DataSysAttribute.cs
- IndexedString.cs
- ADMembershipUser.cs
- BamlRecordHelper.cs
- TimeoutValidationAttribute.cs
- PageCatalogPartDesigner.cs
- ValidationRuleCollection.cs
- TabControl.cs
- HyperLinkField.cs
- MimeObjectFactory.cs
- DictionaryCustomTypeDescriptor.cs
- RijndaelManaged.cs
- EventLogPermissionEntry.cs
- ToggleButtonAutomationPeer.cs
- ControlBuilder.cs
- Decoder.cs
- SqlTypesSchemaImporter.cs
- MeasurementDCInfo.cs
- RepeatEnumerable.cs
- PenCursorManager.cs
- PipelineModuleStepContainer.cs
- CellPartitioner.cs