Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Controls / ValidationRule.cs / 2 / 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
- TCPListener.cs
- ServiceReference.cs
- SplashScreenNativeMethods.cs
- TextBreakpoint.cs
- XmlDataSource.cs
- TextBox.cs
- ImageMap.cs
- XmlSchemaDocumentation.cs
- ButtonFlatAdapter.cs
- QuaternionRotation3D.cs
- DrawTreeNodeEventArgs.cs
- QilParameter.cs
- XmlSchemaProviderAttribute.cs
- MeshGeometry3D.cs
- ProcessHostMapPath.cs
- Line.cs
- CompositeScriptReferenceEventArgs.cs
- SqlInternalConnectionSmi.cs
- SocketException.cs
- XmlDocumentType.cs
- MachineKey.cs
- TextBoxAutoCompleteSourceConverter.cs
- GroupByQueryOperator.cs
- WindowsTab.cs
- ReflectionHelper.cs
- Utils.cs
- SoapSchemaImporter.cs
- XmlSchemaSimpleType.cs
- DesignerDataRelationship.cs
- BaseTemplateBuildProvider.cs
- ObjectItemAttributeAssemblyLoader.cs
- DetailsViewUpdatedEventArgs.cs
- ContainerSelectorActiveEvent.cs
- CharKeyFrameCollection.cs
- AuthenticationModulesSection.cs
- COM2ColorConverter.cs
- GridToolTip.cs
- SoapFormatter.cs
- TreeNodeEventArgs.cs
- SystemInfo.cs
- TrustSection.cs
- SecurityContextSecurityTokenResolver.cs
- ListViewInsertEventArgs.cs
- RotateTransform.cs
- HwndMouseInputProvider.cs
- LabelAutomationPeer.cs
- StreamGeometryContext.cs
- Floater.cs
- ValidatingPropertiesEventArgs.cs
- DesignerActionUI.cs
- TypeNameHelper.cs
- WS2007FederationHttpBindingElement.cs
- EntityTypeEmitter.cs
- DesignTimeParseData.cs
- objectresult_tresulttype.cs
- TextOutput.cs
- SoapFault.cs
- OracleLob.cs
- HtmlControlPersistable.cs
- COM2Properties.cs
- CommandHelper.cs
- ImagingCache.cs
- TraceSection.cs
- NetSectionGroup.cs
- PipelineModuleStepContainer.cs
- oledbmetadatacolumnnames.cs
- OleAutBinder.cs
- EventLogPermissionHolder.cs
- FormParameter.cs
- SettingsSavedEventArgs.cs
- SqlDataReaderSmi.cs
- SafeTimerHandle.cs
- EditCommandColumn.cs
- Message.cs
- WebEvents.cs
- BindingsCollection.cs
- DefaultHttpHandler.cs
- TabControlCancelEvent.cs
- ExceptionRoutedEventArgs.cs
- BuildManager.cs
- TraceRecord.cs
- ClientEventManager.cs
- SplineKeyFrames.cs
- TextModifier.cs
- CodeMemberProperty.cs
- ConfigurationPropertyCollection.cs
- PresentationAppDomainManager.cs
- VisualStyleInformation.cs
- SmtpClient.cs
- PostBackOptions.cs
- VideoDrawing.cs
- DelegateBodyWriter.cs
- CookielessHelper.cs
- HitTestDrawingContextWalker.cs
- SettingsSavedEventArgs.cs
- CompiledQueryCacheEntry.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- VectorCollectionConverter.cs
- RequiredAttributeAttribute.cs
- ObjectMemberMapping.cs