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
- BindingListCollectionView.cs
- HierarchicalDataTemplate.cs
- GeneralTransform3D.cs
- UpDownBase.cs
- documentsequencetextpointer.cs
- EntityConnection.cs
- Opcode.cs
- WorkflowOperationInvoker.cs
- CodeMemberField.cs
- DBCommandBuilder.cs
- XmlEventCache.cs
- XsdValidatingReader.cs
- EventTrigger.cs
- EntityViewContainer.cs
- AdornedElementPlaceholder.cs
- FixedDocumentSequencePaginator.cs
- HtmlUtf8RawTextWriter.cs
- DBParameter.cs
- ConfigPathUtility.cs
- TransformCollection.cs
- DataGridHeaderBorder.cs
- mansign.cs
- WpfPayload.cs
- Activity.cs
- XmlName.cs
- CounterCreationDataCollection.cs
- GestureRecognizer.cs
- TransactedBatchContext.cs
- BlobPersonalizationState.cs
- FixedSOMTable.cs
- EventSinkActivityDesigner.cs
- DesignerValidationSummaryAdapter.cs
- SQLDouble.cs
- EndpointBehaviorElementCollection.cs
- WindowsPen.cs
- MediaElement.cs
- TextDecorationCollection.cs
- Header.cs
- CdpEqualityComparer.cs
- ThumbButtonInfo.cs
- TemplatedControlDesigner.cs
- TableCellCollection.cs
- ExpressionWriter.cs
- GAC.cs
- XmlArrayItemAttribute.cs
- ReflectionUtil.cs
- RulePatternOps.cs
- MasterPageParser.cs
- PeerDuplexChannel.cs
- ViewService.cs
- SingleKeyFrameCollection.cs
- BindingObserver.cs
- CFStream.cs
- MetadataCache.cs
- RIPEMD160Managed.cs
- BindingOperations.cs
- SocketStream.cs
- RoutedEventConverter.cs
- BufferModesCollection.cs
- DataObject.cs
- UserControl.cs
- MouseCaptureWithinProperty.cs
- ControlBuilderAttribute.cs
- SqlConnectionPoolProviderInfo.cs
- GlyphCache.cs
- StringInfo.cs
- _ShellExpression.cs
- DrawingContextWalker.cs
- ExtentCqlBlock.cs
- PathFigureCollection.cs
- UriTemplateLiteralQueryValue.cs
- DataGridLinkButton.cs
- IgnoreSection.cs
- ContractNamespaceAttribute.cs
- Peer.cs
- CachingParameterInspector.cs
- AccessKeyManager.cs
- EnumUnknown.cs
- Button.cs
- MetadataArtifactLoaderFile.cs
- PerformanceCountersElement.cs
- MenuRendererStandards.cs
- XmlDictionary.cs
- COM2PropertyPageUITypeConverter.cs
- PageTheme.cs
- EncoderNLS.cs
- CodeCatchClauseCollection.cs
- ErrorInfoXmlDocument.cs
- CreateInstanceBinder.cs
- DecoderExceptionFallback.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- ObjectAnimationUsingKeyFrames.cs
- CapabilitiesPattern.cs
- SrgsSemanticInterpretationTag.cs
- RequestSecurityTokenForGetBrowserToken.cs
- TemplatedWizardStep.cs
- XmlElement.cs
- SvcMapFile.cs
- RuleSetBrowserDialog.cs
- InputElement.cs