Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Framework / System / Windows / Controls / ValidationErrorEventArgs.cs / 1305600 / 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
- RequestCache.cs
- PropVariant.cs
- AnnouncementService.cs
- MSAAWinEventWrap.cs
- SystemResourceHost.cs
- XmlILConstructAnalyzer.cs
- ImageIndexConverter.cs
- DbConnectionPoolCounters.cs
- StringStorage.cs
- SQLUtility.cs
- NumericPagerField.cs
- EventPropertyMap.cs
- SqlTransaction.cs
- OutputCacheSection.cs
- ManifestResourceInfo.cs
- RenderDataDrawingContext.cs
- SelectionEditor.cs
- OledbConnectionStringbuilder.cs
- WebPartConnectVerb.cs
- QueryAccessibilityHelpEvent.cs
- StringInfo.cs
- PolicyChain.cs
- SchemaImporter.cs
- HMACSHA256.cs
- ThreadStaticAttribute.cs
- DisplayInformation.cs
- ServiceManager.cs
- SoapHttpTransportImporter.cs
- WaitForChangedResult.cs
- ReflectEventDescriptor.cs
- DBSqlParser.cs
- ThreadAbortException.cs
- DataControlImageButton.cs
- MapPathBasedVirtualPathProvider.cs
- SegmentInfo.cs
- CultureMapper.cs
- AsyncResult.cs
- SystemFonts.cs
- WindowsScrollBarBits.cs
- PersistChildrenAttribute.cs
- SQLUtility.cs
- ACL.cs
- ComplexTypeEmitter.cs
- ComplexType.cs
- RawKeyboardInputReport.cs
- XmlSchemaNotation.cs
- TrimSurroundingWhitespaceAttribute.cs
- SynchronousChannelMergeEnumerator.cs
- X509UI.cs
- ButtonBase.cs
- __FastResourceComparer.cs
- XmlWriterSettings.cs
- TextServicesCompartment.cs
- ButtonColumn.cs
- BitmapSource.cs
- ItemsPresenter.cs
- TextShapeableCharacters.cs
- OrderedDictionary.cs
- Model3DGroup.cs
- ColorTranslator.cs
- StructuredTypeEmitter.cs
- XmlCharacterData.cs
- RenderTargetBitmap.cs
- BindingContext.cs
- PersonalizableAttribute.cs
- BackgroundWorker.cs
- StatusBarDrawItemEvent.cs
- DrawListViewSubItemEventArgs.cs
- ViewCellRelation.cs
- XamlLoadErrorInfo.cs
- StrokeFIndices.cs
- EventMappingSettingsCollection.cs
- CodeDomConfigurationHandler.cs
- XmlSchemaCollection.cs
- LazyTextWriterCreator.cs
- LessThanOrEqual.cs
- MD5.cs
- BamlResourceDeserializer.cs
- UIElement.cs
- RegexMatch.cs
- ControlAdapter.cs
- StandardOleMarshalObject.cs
- FlowDocumentReader.cs
- WpfSharedBamlSchemaContext.cs
- ObjectParameterCollection.cs
- AttributeQuery.cs
- TraceEventCache.cs
- KeyGestureValueSerializer.cs
- ExpressionBuilder.cs
- ReadWriteSpinLock.cs
- Choices.cs
- FloaterBaseParaClient.cs
- GridViewUpdateEventArgs.cs
- MultitargetUtil.cs
- DataListItemEventArgs.cs
- WorkflowQueueInfo.cs
- ToolbarAUtomationPeer.cs
- InstancePersistenceContext.cs
- XmlExpressionDumper.cs
- KeyValueConfigurationCollection.cs