Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Framework / System / Windows / Controls / ExceptionValidationRule.cs / 1 / ExceptionValidationRule.cs
//---------------------------------------------------------------------------- // //// Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // // // // Description: // ExceptionValidationRule is used when a ValidationError is the result of an Exception as // there is no actual ValidationRule. // // // See specs at http://avalon/connecteddata/M5%20Specs/Validation.mht // // History: // 1/12/2005 mharper: created. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Globalization; using System.Windows.Controls; namespace System.Windows.Controls { ////// ExceptionValidationRule can be added to the ValidationRulesCollection of a Binding /// or MultiBinding to indicate that Exceptions that occur during UpdateSource should /// be considered ValidationErrors /// public sealed class ExceptionValidationRule : ValidationRule { ////// ExceptionValidationRule ctor. /// public ExceptionValidationRule() { } ////// Validate is called when Data binding is updating /// public override ValidationResult Validate(object value, CultureInfo cultureInfo) { return ValidationResult.ValidResult; } internal static readonly ExceptionValidationRule Instance = new ExceptionValidationRule(); } } // 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: // ExceptionValidationRule is used when a ValidationError is the result of an Exception as // there is no actual ValidationRule. // // // See specs at http://avalon/connecteddata/M5%20Specs/Validation.mht // // History: // 1/12/2005 mharper: created. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Globalization; using System.Windows.Controls; namespace System.Windows.Controls { ////// ExceptionValidationRule can be added to the ValidationRulesCollection of a Binding /// or MultiBinding to indicate that Exceptions that occur during UpdateSource should /// be considered ValidationErrors /// public sealed class ExceptionValidationRule : ValidationRule { ////// ExceptionValidationRule ctor. /// public ExceptionValidationRule() { } ////// Validate is called when Data binding is updating /// public override ValidationResult Validate(object value, CultureInfo cultureInfo) { return ValidationResult.ValidResult; } internal static readonly ExceptionValidationRule Instance = new ExceptionValidationRule(); } } // 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
- SoapExtensionStream.cs
- DocumentXPathNavigator.cs
- FontUnit.cs
- AuditLogLocation.cs
- ExtentJoinTreeNode.cs
- TextOptions.cs
- CollectionBase.cs
- PropertyChangeTracker.cs
- DocumentOrderQuery.cs
- ResourcesChangeInfo.cs
- DomNameTable.cs
- ListenDesigner.cs
- Point3DAnimationBase.cs
- UserUseLicenseDictionaryLoader.cs
- VisualCollection.cs
- EncoderParameter.cs
- LabelDesigner.cs
- DoubleAnimationBase.cs
- CompilationUtil.cs
- Visual.cs
- RegexRunner.cs
- PrintDocument.cs
- Decimal.cs
- ThreadSafeList.cs
- BuildProviderUtils.cs
- RegionIterator.cs
- FontFamilyIdentifier.cs
- HttpProcessUtility.cs
- SymmetricAlgorithm.cs
- BamlResourceDeserializer.cs
- SQLInt64Storage.cs
- CompilerError.cs
- FullTextBreakpoint.cs
- DbProviderConfigurationHandler.cs
- SqlCachedBuffer.cs
- EntityViewGenerationAttribute.cs
- XmlTextReaderImpl.cs
- SQLInt64.cs
- XmlWrappingReader.cs
- XmlBinaryWriterSession.cs
- ElementNotEnabledException.cs
- ContextMenuStrip.cs
- ListViewInsertedEventArgs.cs
- BoundColumn.cs
- SqlUtils.cs
- ApplicationException.cs
- SapiGrammar.cs
- TranslateTransform3D.cs
- CommaDelimitedStringAttributeCollectionConverter.cs
- ServiceModelSecurityTokenRequirement.cs
- DeclarativeCatalogPart.cs
- NameNode.cs
- RotateTransform3D.cs
- UserMapPath.cs
- XmlTextWriter.cs
- ByteStreamGeometryContext.cs
- SimpleBitVector32.cs
- TraceContextEventArgs.cs
- Speller.cs
- BulletDecorator.cs
- TextDecorations.cs
- DataGridViewCellLinkedList.cs
- JoinGraph.cs
- GlyphInfoList.cs
- ListBindingConverter.cs
- HtmlWindow.cs
- SafeArrayRankMismatchException.cs
- ClientConfigurationSystem.cs
- MDIClient.cs
- ServiceModelConfigurationSection.cs
- Compiler.cs
- LicenseContext.cs
- PasswordTextContainer.cs
- Brushes.cs
- EasingQuaternionKeyFrame.cs
- SingleObjectCollection.cs
- SignedPkcs7.cs
- WorkflowStateRollbackService.cs
- ADConnectionHelper.cs
- StringAttributeCollection.cs
- AnnouncementSendsAsyncResult.cs
- BitmapImage.cs
- InvalidFilterCriteriaException.cs
- QilTypeChecker.cs
- DocumentAutomationPeer.cs
- AudioFormatConverter.cs
- SymbolEqualComparer.cs
- FontWeight.cs
- Mappings.cs
- WorkflowInstance.cs
- MailSettingsSection.cs
- HttpRuntimeSection.cs
- ReadOnlyDataSourceView.cs
- TextDecorations.cs
- CustomAttribute.cs
- FtpWebResponse.cs
- OleDbParameterCollection.cs
- BoundColumn.cs
- TextViewSelectionProcessor.cs
- InfoCardRSAPKCS1KeyExchangeDeformatter.cs