Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Framework / System / Windows / Controls / ValidationErrorEventArgs.cs / 1 / ValidationErrorEventArgs.cs
//---------------------------------------------------------------------------- // //// Copyright (C) 2003 by Microsoft Corporation. All rights reserved. // // // // Description: // EventArgs for ValidationError event. // // See specs at http://avalon/connecteddata/Specs/Validation.mht // // History: // 5/13/2004 mharper: created. // //--------------------------------------------------------------------------- using System; using System.Windows; using MS.Internal; namespace System.Windows.Controls { ///Describes if a validation error has been added or cleared /// public enum ValidationErrorEventAction { ///A new ValidationError has been detected. Added, ///An existing ValidationError has been cleared. Removed, } ////// EventArgs for ValidationError event. /// public class ValidationErrorEventArgs : RoutedEventArgs { ////// Constructor /// internal ValidationErrorEventArgs(ValidationError validationError, ValidationErrorEventAction action) { Invariant.Assert(validationError != null); RoutedEvent = Validation.ErrorEvent; _validationError = validationError; _action = action; } ////// The ValidationError that caused this ValidationErrorEvent to /// be raised. /// public ValidationError Error { get { return _validationError; } } ////// Action indicates whether the public ValidationErrorEventAction Action { get { return _action; } } ///is a new error /// or a previous error that has now been cleared. /// /// The mechanism used to call the type-specific handler on the /// target. /// /// /// The generic handler to call in a type-specific way. /// /// /// The target to call the handler on. /// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { EventHandlerhandler = (EventHandler ) genericHandler; handler(genericTarget, this); } private ValidationError _validationError; private ValidationErrorEventAction _action; } } // 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: // EventArgs for ValidationError event. // // See specs at http://avalon/connecteddata/Specs/Validation.mht // // History: // 5/13/2004 mharper: created. // //--------------------------------------------------------------------------- using System; using System.Windows; using MS.Internal; namespace System.Windows.Controls { ///Describes if a validation error has been added or cleared /// public enum ValidationErrorEventAction { ///A new ValidationError has been detected. Added, ///An existing ValidationError has been cleared. Removed, } ////// EventArgs for ValidationError event. /// public class ValidationErrorEventArgs : RoutedEventArgs { ////// Constructor /// internal ValidationErrorEventArgs(ValidationError validationError, ValidationErrorEventAction action) { Invariant.Assert(validationError != null); RoutedEvent = Validation.ErrorEvent; _validationError = validationError; _action = action; } ////// The ValidationError that caused this ValidationErrorEvent to /// be raised. /// public ValidationError Error { get { return _validationError; } } ////// Action indicates whether the public ValidationErrorEventAction Action { get { return _action; } } ///is a new error /// or a previous error that has now been cleared. /// /// The mechanism used to call the type-specific handler on the /// target. /// /// /// The generic handler to call in a type-specific way. /// /// /// The target to call the handler on. /// protected override void InvokeEventHandler(Delegate genericHandler, object genericTarget) { EventHandlerhandler = (EventHandler ) genericHandler; handler(genericTarget, this); } private ValidationError _validationError; private ValidationErrorEventAction _action; } } // 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
- SizeConverter.cs
- Constants.cs
- GenericsNotImplementedException.cs
- typedescriptorpermission.cs
- SectionInformation.cs
- JobPageOrder.cs
- XmlAnyAttributeAttribute.cs
- oledbmetadatacolumnnames.cs
- AnimationClockResource.cs
- PageAsyncTaskManager.cs
- WaitForChangedResult.cs
- ObjectAnimationBase.cs
- ServiceOperationInfoTypeConverter.cs
- XPathAncestorIterator.cs
- XmlSchemaIdentityConstraint.cs
- RequestCachingSection.cs
- GCHandleCookieTable.cs
- CollectionBuilder.cs
- HandlerBase.cs
- CheckBoxAutomationPeer.cs
- CheckedListBox.cs
- ManagedWndProcTracker.cs
- PropertyItemInternal.cs
- PrimitiveCodeDomSerializer.cs
- UIElementHelper.cs
- BatchParser.cs
- DocumentSchemaValidator.cs
- DbTypeMap.cs
- WindowsFormsLinkLabel.cs
- FieldValue.cs
- NativeMethods.cs
- uribuilder.cs
- SHA256Managed.cs
- StatusStrip.cs
- StatusBarItemAutomationPeer.cs
- GroupItemAutomationPeer.cs
- VirtualPath.cs
- LayoutInformation.cs
- BCLDebug.cs
- Helpers.cs
- AssertUtility.cs
- DocumentationServerProtocol.cs
- XmlSerializationWriter.cs
- DBConnectionString.cs
- CollectionDataContract.cs
- ProviderSettingsCollection.cs
- Formatter.cs
- InputMethodStateTypeInfo.cs
- TransformerInfo.cs
- UTF8Encoding.cs
- SharedUtils.cs
- HwndTarget.cs
- DiscoveryInnerClientManaged11.cs
- VectorConverter.cs
- OutKeywords.cs
- SqlServices.cs
- ResXBuildProvider.cs
- DoubleAnimationUsingPath.cs
- CodeVariableDeclarationStatement.cs
- FormatterServices.cs
- PrintEvent.cs
- XmlSerializableReader.cs
- ErrorFormatterPage.cs
- _FtpDataStream.cs
- Int16AnimationBase.cs
- WebChannelFactory.cs
- SizeKeyFrameCollection.cs
- ContainerUIElement3D.cs
- OrderedDictionary.cs
- PolicyManager.cs
- ConnectionManagementElementCollection.cs
- WebMethodAttribute.cs
- SyncOperationState.cs
- DbParameterCollectionHelper.cs
- LambdaCompiler.Address.cs
- WindowsFont.cs
- ListViewInsertedEventArgs.cs
- AttributeQuery.cs
- MemberRelationshipService.cs
- CodeAttributeArgument.cs
- DiscoveryDocument.cs
- SafeProcessHandle.cs
- SingleObjectCollection.cs
- ZipIOBlockManager.cs
- ScopelessEnumAttribute.cs
- CounterCreationDataCollection.cs
- BeginStoryboard.cs
- SqlNodeAnnotations.cs
- SiteMapNodeCollection.cs
- CallbackException.cs
- DataTemplateKey.cs
- TypePresenter.xaml.cs
- SqlConnection.cs
- SystemInfo.cs
- ManagementQuery.cs
- ResourcePart.cs
- ADConnectionHelper.cs
- SymmetricSecurityBindingElement.cs
- EventLogPermission.cs
- XmlAutoDetectWriter.cs