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
- CompilationRelaxations.cs
- TriggerBase.cs
- BehaviorEditorPart.cs
- EdmToObjectNamespaceMap.cs
- MenuEventArgs.cs
- Restrictions.cs
- WebPartZoneBase.cs
- TemplateManager.cs
- cache.cs
- XmlQueryTypeFactory.cs
- XmlComment.cs
- SymmetricAlgorithm.cs
- ConfigurationLocationCollection.cs
- LocalizabilityAttribute.cs
- SubtreeProcessor.cs
- SmiEventSink_DeferedProcessing.cs
- NetTcpBindingCollectionElement.cs
- DataSysAttribute.cs
- MembershipUser.cs
- RichTextBox.cs
- Random.cs
- MarkupCompilePass2.cs
- LassoHelper.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- AnnouncementInnerClient11.cs
- _Rfc2616CacheValidators.cs
- SequentialOutput.cs
- ObjectDataSourceEventArgs.cs
- CacheEntry.cs
- ObsoleteAttribute.cs
- ProviderConnectionPointCollection.cs
- Point4DConverter.cs
- ProfileGroupSettings.cs
- KnownTypes.cs
- DesignerObjectListAdapter.cs
- InitializationEventAttribute.cs
- NumericUpDownAcceleration.cs
- ObjectSecurity.cs
- LayoutEvent.cs
- RecipientInfo.cs
- ValidatingPropertiesEventArgs.cs
- SQLRoleProvider.cs
- NavigationExpr.cs
- BaseDataBoundControl.cs
- AttachmentService.cs
- StorageRoot.cs
- TrackingServices.cs
- DataGridCaption.cs
- Label.cs
- Interlocked.cs
- ApplicationDirectory.cs
- WindowsFormsHost.cs
- WebDescriptionAttribute.cs
- HttpVersion.cs
- PageRequestManager.cs
- HttpProfileGroupBase.cs
- BrowserDefinitionCollection.cs
- StringValidator.cs
- _BaseOverlappedAsyncResult.cs
- ShutDownListener.cs
- ElapsedEventArgs.cs
- XmlDigitalSignatureProcessor.cs
- DataGridViewSelectedCellCollection.cs
- RawStylusInputCustomData.cs
- BaseProcessor.cs
- XmlCharacterData.cs
- PenThreadWorker.cs
- FromRequest.cs
- relpropertyhelper.cs
- ContainsSearchOperator.cs
- HtmlDocument.cs
- DbMetaDataFactory.cs
- ActivityCodeDomSerializer.cs
- ComboBox.cs
- BamlBinaryReader.cs
- CommonGetThemePartSize.cs
- ArgumentOutOfRangeException.cs
- FixedFlowMap.cs
- EdmConstants.cs
- ObjectCloneHelper.cs
- DesignerHelpers.cs
- ManipulationVelocities.cs
- ContextBase.cs
- sqlnorm.cs
- pingexception.cs
- ListViewDeleteEventArgs.cs
- SourceInterpreter.cs
- AutomationProperties.cs
- ToolStripProgressBar.cs
- ItemsControl.cs
- ComponentConverter.cs
- CallContext.cs
- StructuredTypeInfo.cs
- KnownIds.cs
- QueryExpr.cs
- XD.cs
- MsiStyleLogWriter.cs
- BulletDecorator.cs
- PropertyPathConverter.cs
- SqlDataRecord.cs