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
- ModuleConfigurationInfo.cs
- PropertyGridEditorPart.cs
- RightsManagementEncryptionTransform.cs
- DataGridViewRowPrePaintEventArgs.cs
- CollectionBase.cs
- EntityDesignerUtils.cs
- Decimal.cs
- AndCondition.cs
- TimeSpanHelper.cs
- CodeLabeledStatement.cs
- UrlAuthFailedErrorFormatter.cs
- GiveFeedbackEventArgs.cs
- ResourcesGenerator.cs
- InvalidChannelBindingException.cs
- InputMethod.cs
- codemethodreferenceexpression.cs
- PersonalizationStateInfo.cs
- WebBrowserPermission.cs
- SiteMap.cs
- ErrorFormatterPage.cs
- BaseComponentEditor.cs
- DoubleAnimationClockResource.cs
- TreePrinter.cs
- OracleInfoMessageEventArgs.cs
- QilDataSource.cs
- ReflectionHelper.cs
- Attributes.cs
- Focus.cs
- SqlCommand.cs
- ServiceDescriptionData.cs
- User.cs
- COM2IDispatchConverter.cs
- SqlBinder.cs
- ConstantCheck.cs
- PreviousTrackingServiceAttribute.cs
- Activation.cs
- WebRequestModuleElementCollection.cs
- PointConverter.cs
- OleCmdHelper.cs
- EmptyControlCollection.cs
- HtmlTableCellCollection.cs
- bidPrivateBase.cs
- ParseNumbers.cs
- AdapterUtil.cs
- BindingExpressionUncommonField.cs
- DoubleAnimationBase.cs
- Tool.cs
- UnauthorizedWebPart.cs
- COMException.cs
- DefaultValueConverter.cs
- LogArchiveSnapshot.cs
- TreeViewImageKeyConverter.cs
- ToolTipService.cs
- WebPartConnectionsCancelVerb.cs
- SQLRoleProvider.cs
- HtmlInputPassword.cs
- RangeValidator.cs
- SmtpMail.cs
- HttpResponseHeader.cs
- XDRSchema.cs
- PageTheme.cs
- ConfigurationLockCollection.cs
- ExpressionEditorSheet.cs
- ThemeableAttribute.cs
- FloaterBaseParagraph.cs
- CompositeFontFamily.cs
- CopyAction.cs
- OleDbConnectionInternal.cs
- DesignerDataTable.cs
- TemplateKey.cs
- NativeMethods.cs
- XslCompiledTransform.cs
- XPathDescendantIterator.cs
- IndependentAnimationStorage.cs
- WebPartEditorApplyVerb.cs
- Substitution.cs
- IDictionary.cs
- KeyConverter.cs
- LogReservationCollection.cs
- EditorAttribute.cs
- BypassElement.cs
- SspiHelper.cs
- TabItemAutomationPeer.cs
- OleDbException.cs
- InputScope.cs
- DrawingGroupDrawingContext.cs
- WindowsMenu.cs
- ExternalException.cs
- FacetDescriptionElement.cs
- HyperLinkDataBindingHandler.cs
- WorkflowViewStateService.cs
- WebPartEditorApplyVerb.cs
- BezierSegment.cs
- DataGridRow.cs
- PlanCompiler.cs
- ReachObjectContext.cs
- DataSourceControl.cs
- ProtocolReflector.cs
- MethodMessage.cs
- PanelStyle.cs