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
- X509CertificateValidator.cs
- ListControlConvertEventArgs.cs
- XmlDataDocument.cs
- ErrorWrapper.cs
- LicenseProviderAttribute.cs
- securitycriticaldataformultiplegetandset.cs
- SymbolEqualComparer.cs
- DebugInfoExpression.cs
- CategoryAttribute.cs
- TokenDescriptor.cs
- Win32KeyboardDevice.cs
- HttpCachePolicyElement.cs
- OuterGlowBitmapEffect.cs
- XslAstAnalyzer.cs
- Variable.cs
- mactripleDES.cs
- KeySpline.cs
- MetadataPropertyvalue.cs
- HelpProvider.cs
- PromptBuilder.cs
- ADMembershipProvider.cs
- MdImport.cs
- DifferencingCollection.cs
- MeasureData.cs
- AttachedPropertiesService.cs
- XmlDomTextWriter.cs
- SizeAnimation.cs
- wgx_commands.cs
- DirectionalLight.cs
- RowToFieldTransformer.cs
- EditorZoneBase.cs
- HMAC.cs
- Socket.cs
- LOSFormatter.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- WmiEventSink.cs
- RegexRunnerFactory.cs
- QilStrConcatenator.cs
- WindowsTokenRoleProvider.cs
- QfeChecker.cs
- ScaleTransform.cs
- ValueType.cs
- DefaultShape.cs
- DataGridCommandEventArgs.cs
- VirtualPathUtility.cs
- GridItemProviderWrapper.cs
- WebRequestModulesSection.cs
- QilReference.cs
- ThreadExceptionEvent.cs
- BindingOperations.cs
- HtmlControlPersistable.cs
- TransformGroup.cs
- ReferenceConverter.cs
- NamespaceInfo.cs
- LogicalExpr.cs
- XmlSchemaImport.cs
- ListView.cs
- HyperlinkAutomationPeer.cs
- BadImageFormatException.cs
- EntityDataSourceDataSelection.cs
- DbConnectionStringCommon.cs
- QueryableDataSourceEditData.cs
- DesignSurface.cs
- Rectangle.cs
- PenCursorManager.cs
- IPGlobalProperties.cs
- MembershipUser.cs
- DataGridHeaderBorder.cs
- BufferBuilder.cs
- PersonalizationAdministration.cs
- EntityTypeEmitter.cs
- ResizeGrip.cs
- HostSecurityManager.cs
- VisualBasicReference.cs
- AxHost.cs
- ReferencedType.cs
- ObjectViewEntityCollectionData.cs
- DescendentsWalkerBase.cs
- PublishLicense.cs
- AsymmetricKeyExchangeDeformatter.cs
- FaultDescription.cs
- SQLMembershipProvider.cs
- DataControlPagerLinkButton.cs
- AutomationElementIdentifiers.cs
- SqlConnection.cs
- ListParagraph.cs
- HtmlInputSubmit.cs
- SchemaAttDef.cs
- CommunicationObjectFaultedException.cs
- CallTemplateAction.cs
- ItemTypeToolStripMenuItem.cs
- CompositeCollection.cs
- ScriptingScriptResourceHandlerSection.cs
- CrossAppDomainChannel.cs
- HeaderUtility.cs
- URL.cs
- CapabilitiesAssignment.cs
- TrackingMemoryStreamFactory.cs
- ToolTip.cs
- ColumnCollection.cs