Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- HandleCollector.cs
- RealizedColumnsBlock.cs
- FastEncoderWindow.cs
- CommentAction.cs
- XmlFormatExtensionAttribute.cs
- WebPartPersonalization.cs
- GcHandle.cs
- TextPattern.cs
- LogLogRecord.cs
- MonthChangedEventArgs.cs
- XmlAttributeCollection.cs
- OracleDataAdapter.cs
- AnnotationDocumentPaginator.cs
- KeyEvent.cs
- PreloadedPackages.cs
- FlowLayout.cs
- ControlEvent.cs
- RelationshipSet.cs
- ObjectConverter.cs
- HandlerWithFactory.cs
- xmlglyphRunInfo.cs
- UnionCqlBlock.cs
- SchemaSetCompiler.cs
- HttpHeaderCollection.cs
- ResXBuildProvider.cs
- StorageConditionPropertyMapping.cs
- _FixedSizeReader.cs
- ListItemParagraph.cs
- CategoryAttribute.cs
- DataSourceConverter.cs
- Button.cs
- ValueType.cs
- RNGCryptoServiceProvider.cs
- SqlUserDefinedTypeAttribute.cs
- ProcessModuleCollection.cs
- Canvas.cs
- ModifierKeysValueSerializer.cs
- CompressionTransform.cs
- ListViewItem.cs
- BeginStoryboard.cs
- EventEntry.cs
- DataObjectEventArgs.cs
- PerformanceCounter.cs
- DataViewManager.cs
- coordinatorfactory.cs
- sqlnorm.cs
- HttpCookieCollection.cs
- MessageFault.cs
- SafeNativeMethods.cs
- ReadOnlyDictionary.cs
- Container.cs
- XmlDictionaryString.cs
- RenderingBiasValidation.cs
- InspectionWorker.cs
- XmlSchema.cs
- DefaultParameterValueAttribute.cs
- XmlStreamedByteStreamReader.cs
- BamlStream.cs
- CustomAssemblyResolver.cs
- BinaryWriter.cs
- DataReaderContainer.cs
- EntityCommand.cs
- ByteStreamGeometryContext.cs
- XmlSecureResolver.cs
- HotSpot.cs
- TimeSpan.cs
- SetterBaseCollection.cs
- ToolStripItemClickedEventArgs.cs
- DocumentOrderQuery.cs
- Command.cs
- FilterableAttribute.cs
- XmlSerializationReader.cs
- PrintController.cs
- DockAndAnchorLayout.cs
- DropDownList.cs
- TextTreeInsertUndoUnit.cs
- TimeoutHelper.cs
- __Filters.cs
- TimeStampChecker.cs
- ArrangedElementCollection.cs
- LayoutEngine.cs
- LicenseException.cs
- CharEntityEncoderFallback.cs
- ActivityTypeCodeDomSerializer.cs
- Wildcard.cs
- HttpBrowserCapabilitiesWrapper.cs
- TemplatePropertyEntry.cs
- StackOverflowException.cs
- SqlError.cs
- StateMachine.cs
- TrustManager.cs
- FileEnumerator.cs
- ProviderSettings.cs
- SafeFileMappingHandle.cs
- FolderBrowserDialogDesigner.cs
- UnsafeNativeMethodsPenimc.cs
- DataListItemCollection.cs
- ChangePasswordAutoFormat.cs
- SqlDataRecord.cs
- ProxyHwnd.cs