Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- IIS7UserPrincipal.cs
- DataPager.cs
- BitmapEffectDrawing.cs
- OrderedDictionaryStateHelper.cs
- OdbcUtils.cs
- Operators.cs
- FormsAuthenticationUser.cs
- HostedBindingBehavior.cs
- UniqueContractNameValidationBehavior.cs
- InputScopeNameConverter.cs
- ProgramPublisher.cs
- WeakHashtable.cs
- webeventbuffer.cs
- DownloadProgressEventArgs.cs
- ObjectHandle.cs
- SimplePropertyEntry.cs
- DigestTraceRecordHelper.cs
- DataSysAttribute.cs
- HttpHandlerAction.cs
- NetworkInformationPermission.cs
- EmptyImpersonationContext.cs
- SqlMetaData.cs
- URLMembershipCondition.cs
- ScaleTransform3D.cs
- MtomMessageEncoder.cs
- DesigntimeLicenseContext.cs
- HMACRIPEMD160.cs
- RedirectionProxy.cs
- ScrollChrome.cs
- SQLMoney.cs
- XmlSignificantWhitespace.cs
- CompiledQueryCacheKey.cs
- WebConfigManager.cs
- AppDomainProtocolHandler.cs
- DropDownButton.cs
- SymmetricKeyWrap.cs
- Parameter.cs
- ComponentDispatcherThread.cs
- PrinterUnitConvert.cs
- ElementProxy.cs
- VisualBrush.cs
- AssignDesigner.xaml.cs
- DesignerView.cs
- querybuilder.cs
- PointLight.cs
- DocumentGridContextMenu.cs
- NumberSubstitution.cs
- DomNameTable.cs
- TreeNodeClickEventArgs.cs
- ProfileProvider.cs
- Comparer.cs
- StringAnimationUsingKeyFrames.cs
- XmlConvert.cs
- PrinterResolution.cs
- SafeHandle.cs
- DATA_BLOB.cs
- ExpandableObjectConverter.cs
- ValidationUtility.cs
- StringOutput.cs
- EncryptRequest.cs
- LZCodec.cs
- Material.cs
- ActiveXMessageFormatter.cs
- DecoderReplacementFallback.cs
- CodeIdentifiers.cs
- TabItem.cs
- basevalidator.cs
- MSAAEventDispatcher.cs
- StatusBarPanelClickEvent.cs
- BindableTemplateBuilder.cs
- RadialGradientBrush.cs
- PropertyBuilder.cs
- DataControlReference.cs
- InkCanvasFeedbackAdorner.cs
- SelectingProviderEventArgs.cs
- MachineKeyConverter.cs
- CharacterHit.cs
- AstTree.cs
- ThemeableAttribute.cs
- PointAnimationClockResource.cs
- BinaryWriter.cs
- SmtpAuthenticationManager.cs
- PnrpPermission.cs
- Win32.cs
- DtrList.cs
- CharConverter.cs
- KnownBoxes.cs
- WindowsClaimSet.cs
- PageContent.cs
- XmlWrappingWriter.cs
- RemotingException.cs
- BuildProviderAppliesToAttribute.cs
- TagPrefixInfo.cs
- SHA384Managed.cs
- WebPartTransformerCollection.cs
- StringInfo.cs
- TableAutomationPeer.cs
- WebReferencesBuildProvider.cs
- EncodingInfo.cs
- EmptyEnumerable.cs