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
- WindowsFont.cs
- ObjectStateManager.cs
- DesignBindingPicker.cs
- ArrangedElement.cs
- EntityDataSourceEntityTypeFilterConverter.cs
- ControlLocalizer.cs
- JavaScriptString.cs
- _ContextAwareResult.cs
- IndexingContentUnit.cs
- Fonts.cs
- ToolStripItemTextRenderEventArgs.cs
- BufferedGraphicsContext.cs
- rsa.cs
- LinkClickEvent.cs
- Transform3DGroup.cs
- ConfigXmlComment.cs
- DocumentPropertiesDialog.cs
- PointConverter.cs
- RunClient.cs
- NameHandler.cs
- FrameworkEventSource.cs
- WindowVisualStateTracker.cs
- ObjectQueryState.cs
- SortDescription.cs
- InvalidPropValue.cs
- SQLDecimalStorage.cs
- BitmapEncoder.cs
- IndexedGlyphRun.cs
- XmlReaderSettings.cs
- InstanceCompleteException.cs
- DataGridViewColumnTypePicker.cs
- HtmlDocument.cs
- Oid.cs
- WinFormsSecurity.cs
- AutomationPatternInfo.cs
- ProtocolElementCollection.cs
- FontStretchConverter.cs
- SimplePropertyEntry.cs
- RectAnimationClockResource.cs
- ItemsChangedEventArgs.cs
- ReferenceConverter.cs
- FacetEnabledSchemaElement.cs
- ComponentDispatcherThread.cs
- SiteMapPath.cs
- TransactionsSectionGroup.cs
- TraceUtility.cs
- EdmTypeAttribute.cs
- ImageCollectionCodeDomSerializer.cs
- BrowserTree.cs
- ComboBoxAutomationPeer.cs
- NamedPipeAppDomainProtocolHandler.cs
- SqlDataReaderSmi.cs
- WebMessageFormatHelper.cs
- Comparer.cs
- MsmqChannelFactoryBase.cs
- TraceLevelStore.cs
- JsonObjectDataContract.cs
- DataError.cs
- DataGridViewTextBoxColumn.cs
- EventHandlerList.cs
- UpdateCommand.cs
- XmlSchema.cs
- ApplicationHost.cs
- FolderLevelBuildProviderCollection.cs
- FlagsAttribute.cs
- RsaSecurityToken.cs
- ServiceOperation.cs
- CommonXSendMessage.cs
- ProfileService.cs
- PerformanceCounterPermission.cs
- RemotingService.cs
- FontStyle.cs
- RequestCacheEntry.cs
- CatalogPartChrome.cs
- SqlVisitor.cs
- DataMemberConverter.cs
- ParseNumbers.cs
- XmlSchemaInfo.cs
- CodeTypeMemberCollection.cs
- TextLineResult.cs
- HyperlinkAutomationPeer.cs
- MenuBase.cs
- SaveWorkflowAsyncResult.cs
- ManagedIStream.cs
- Pair.cs
- Roles.cs
- FileDialog_Vista.cs
- ObservableDictionary.cs
- PerformanceCounterCategory.cs
- AudienceUriMode.cs
- ProcessManager.cs
- PrimitiveType.cs
- ProfileBuildProvider.cs
- NativeRecognizer.cs
- DesignerDataSourceView.cs
- GestureRecognizer.cs
- EntityDataSourceQueryBuilder.cs
- FileIOPermission.cs
- RSAPKCS1SignatureDeformatter.cs
- ServiceDescriptions.cs