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
- SourceChangedEventArgs.cs
- ChtmlCalendarAdapter.cs
- TableStyle.cs
- ActivityDesignerResources.cs
- OleDbFactory.cs
- FtpWebRequest.cs
- XPathAncestorIterator.cs
- WorkflowNamespace.cs
- NullableIntSumAggregationOperator.cs
- OdbcConnectionFactory.cs
- InvokePatternIdentifiers.cs
- Latin1Encoding.cs
- DoubleLinkListEnumerator.cs
- Range.cs
- XmlSchemaObjectCollection.cs
- ListControl.cs
- Listen.cs
- CodeMemberMethod.cs
- DerivedKeySecurityTokenStub.cs
- Task.cs
- XsltLibrary.cs
- ReversePositionQuery.cs
- WebPartsPersonalization.cs
- RefreshInfo.cs
- OutOfProcStateClientManager.cs
- SQLBytesStorage.cs
- ModelTreeEnumerator.cs
- DBPropSet.cs
- SapiAttributeParser.cs
- TempEnvironment.cs
- XmlDataSourceNodeDescriptor.cs
- ScopedMessagePartSpecification.cs
- WebUtil.cs
- LayoutUtils.cs
- XmlAutoDetectWriter.cs
- SerializationInfoEnumerator.cs
- BuildProvider.cs
- FileSecurity.cs
- RemotingHelper.cs
- LookupNode.cs
- ColorConverter.cs
- XmlSchemaAttributeGroup.cs
- BuilderPropertyEntry.cs
- EntityDesignerDataSourceView.cs
- StrokeNodeData.cs
- OutputCacheSettingsSection.cs
- RowToFieldTransformer.cs
- DeflateStream.cs
- DelegatingConfigHost.cs
- ListenerAdapterBase.cs
- SqlSupersetValidator.cs
- DbProviderServices.cs
- IIS7UserPrincipal.cs
- CommandPlan.cs
- Base64Decoder.cs
- XmlSchemaImport.cs
- SmtpSection.cs
- NotSupportedException.cs
- Guid.cs
- XLinq.cs
- WebPartEditorOkVerb.cs
- OleDbInfoMessageEvent.cs
- OrthographicCamera.cs
- Figure.cs
- SQLInt64.cs
- ColorAnimationBase.cs
- SocketPermission.cs
- FlowchartSizeFeature.cs
- QilReference.cs
- XmlSerializationReader.cs
- ClonableStack.cs
- GifBitmapDecoder.cs
- MemberPathMap.cs
- CompilerError.cs
- PathFigure.cs
- SettingsSection.cs
- basecomparevalidator.cs
- Line.cs
- MarkupExtensionParser.cs
- Environment.cs
- HijriCalendar.cs
- ReferenceAssemblyAttribute.cs
- RoleServiceManager.cs
- StylusTip.cs
- Region.cs
- StringSorter.cs
- BooleanStorage.cs
- VBCodeProvider.cs
- LoginCancelEventArgs.cs
- WebPartEditorOkVerb.cs
- codemethodreferenceexpression.cs
- ConfigXmlCDataSection.cs
- ProjectionPruner.cs
- Convert.cs
- FaultCode.cs
- SmtpDigestAuthenticationModule.cs
- Monitor.cs
- XmlSchemaProviderAttribute.cs
- StyleSheetDesigner.cs
- ClientScriptManager.cs