Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- ExtensionQuery.cs
- XmlAttribute.cs
- TextEditorCopyPaste.cs
- X509CertificateRecipientServiceCredential.cs
- ModelVisual3D.cs
- GrammarBuilderWildcard.cs
- DesignerDeviceConfig.cs
- TargetConverter.cs
- MenuItemStyle.cs
- SignerInfo.cs
- StringFreezingAttribute.cs
- RemotingHelper.cs
- DataListCommandEventArgs.cs
- DelegateHelpers.Generated.cs
- SharedDp.cs
- DependencyObjectType.cs
- DelegatingTypeDescriptionProvider.cs
- RepeaterItem.cs
- Label.cs
- XmlILAnnotation.cs
- DateTimeFormatInfoScanner.cs
- ValidatorCompatibilityHelper.cs
- wpf-etw.cs
- BlobPersonalizationState.cs
- RoleService.cs
- InputLanguageCollection.cs
- WebExceptionStatus.cs
- XmlIterators.cs
- XsltException.cs
- RolePrincipal.cs
- SqlDataSourceView.cs
- SoapAttributeAttribute.cs
- DataGridClipboardCellContent.cs
- BitmapSizeOptions.cs
- ProcessThread.cs
- SqlRemoveConstantOrderBy.cs
- Matrix3DValueSerializer.cs
- CompilerTypeWithParams.cs
- TypeDelegator.cs
- FontSizeConverter.cs
- AuthenticationModuleElement.cs
- TemplateKeyConverter.cs
- RemoteCryptoSignHashRequest.cs
- UnitySerializationHolder.cs
- CodeTypeDeclaration.cs
- TypedElement.cs
- SqlRowUpdatingEvent.cs
- DataGridItemEventArgs.cs
- ToolStripSystemRenderer.cs
- MediaTimeline.cs
- SamlSubjectStatement.cs
- AttributeQuery.cs
- IntPtr.cs
- CodeNamespaceCollection.cs
- InkPresenterAutomationPeer.cs
- HandlerBase.cs
- StreamWriter.cs
- BinaryFormatterWriter.cs
- dataSvcMapFileLoader.cs
- Stack.cs
- HttpHandlerActionCollection.cs
- CopyOnWriteList.cs
- SqlDuplicator.cs
- ByteAnimationUsingKeyFrames.cs
- _Events.cs
- OleDbEnumerator.cs
- StoragePropertyMapping.cs
- DateTimeParse.cs
- SafeCancelMibChangeNotify.cs
- TableLayoutStyle.cs
- BaseTemplateCodeDomTreeGenerator.cs
- DisposableCollectionWrapper.cs
- SynchronizedChannelCollection.cs
- CompressStream.cs
- WSFederationHttpSecurityElement.cs
- XpsFilter.cs
- InProcStateClientManager.cs
- XmlTextReader.cs
- VectorCollectionValueSerializer.cs
- SchemaConstraints.cs
- PrinterResolution.cs
- CodeExporter.cs
- ServicePointManager.cs
- SqlServices.cs
- NullRuntimeConfig.cs
- WebHttpSecurityModeHelper.cs
- ChannelTracker.cs
- ThreadExceptionDialog.cs
- ConsumerConnectionPointCollection.cs
- XmlConvert.cs
- RequestTimeoutManager.cs
- PageBuildProvider.cs
- TransactionInformation.cs
- DisposableCollectionWrapper.cs
- ActivitiesCollection.cs
- NameValuePermission.cs
- TemplateBindingExtensionConverter.cs
- BitmapSourceSafeMILHandle.cs
- RepeaterItemCollection.cs
- LineUtil.cs