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
- CatalogZoneBase.cs
- SByteConverter.cs
- control.ime.cs
- ToolStripOverflow.cs
- XmlSchemaObjectTable.cs
- SessionState.cs
- FragmentNavigationEventArgs.cs
- WebPartEditorCancelVerb.cs
- CachedBitmap.cs
- CodeTypeReferenceExpression.cs
- AppLevelCompilationSectionCache.cs
- TypeSource.cs
- XmlMemberMapping.cs
- XhtmlBasicListAdapter.cs
- FileUtil.cs
- DoubleCollectionValueSerializer.cs
- URL.cs
- LassoHelper.cs
- OrderByBuilder.cs
- ContentFileHelper.cs
- InkPresenterAutomationPeer.cs
- XmlIlVisitor.cs
- DetailsView.cs
- ChineseLunisolarCalendar.cs
- XmlSchema.cs
- DataGridItemCollection.cs
- TransportListener.cs
- XmlSortKey.cs
- HttpProfileBase.cs
- ResourceType.cs
- DataPagerFieldItem.cs
- _TransmitFileOverlappedAsyncResult.cs
- COAUTHINFO.cs
- DataObjectCopyingEventArgs.cs
- HttpCacheVary.cs
- ScrollBar.cs
- DataSourceHelper.cs
- X509Certificate.cs
- DataControlFieldHeaderCell.cs
- SourceChangedEventArgs.cs
- ConfigurationSectionGroup.cs
- ReaderContextStackData.cs
- OdbcDataAdapter.cs
- HttpCacheParams.cs
- Image.cs
- SafeMarshalContext.cs
- ActivityPropertyReference.cs
- GroupBox.cs
- COM2EnumConverter.cs
- PagerSettings.cs
- RemotingException.cs
- Pointer.cs
- BindingMAnagerBase.cs
- EnvelopedPkcs7.cs
- TaiwanCalendar.cs
- SmtpTransport.cs
- FixUp.cs
- TransactionContextManager.cs
- ByteStream.cs
- SecurityPolicySection.cs
- SqlDataSourceAdvancedOptionsForm.cs
- Material.cs
- WebException.cs
- storepermission.cs
- Icon.cs
- DoubleCollectionValueSerializer.cs
- EdmComplexTypeAttribute.cs
- ErrorStyle.cs
- EFTableProvider.cs
- BindableAttribute.cs
- CharAnimationBase.cs
- Page.cs
- TraceHandlerErrorFormatter.cs
- HttpCookie.cs
- SqlExpander.cs
- HttpGetServerProtocol.cs
- SessionStateContainer.cs
- WebPartDeleteVerb.cs
- FilterEventArgs.cs
- DataGridViewAutoSizeModeEventArgs.cs
- ListViewItemCollectionEditor.cs
- PolyLineSegment.cs
- MouseGestureConverter.cs
- CreateUserWizard.cs
- CustomLineCap.cs
- CompilerGlobalScopeAttribute.cs
- XhtmlBasicFormAdapter.cs
- KeyValueInternalCollection.cs
- ItemPager.cs
- ListViewItemMouseHoverEvent.cs
- CryptoHelper.cs
- ViewEvent.cs
- ServiceKnownTypeAttribute.cs
- WebPartUtil.cs
- CategoryNameCollection.cs
- TrimSurroundingWhitespaceAttribute.cs
- AssemblySettingAttributes.cs
- StateRuntime.cs
- EventLevel.cs
- ControllableStoryboardAction.cs