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
- HwndProxyElementProvider.cs
- Parser.cs
- IdentityReference.cs
- DropShadowBitmapEffect.cs
- EntityReference.cs
- WebServicesSection.cs
- ASCIIEncoding.cs
- CfgArc.cs
- SqlConnectionStringBuilder.cs
- ThrowHelper.cs
- PerformanceCounterNameAttribute.cs
- InvalidOleVariantTypeException.cs
- SQLResource.cs
- FigureHelper.cs
- RichListBox.cs
- coordinator.cs
- SqlConnectionHelper.cs
- QueryContinueDragEventArgs.cs
- ClientProxyGenerator.cs
- Behavior.cs
- _UncName.cs
- DownloadProgressEventArgs.cs
- TdsRecordBufferSetter.cs
- SendMailErrorEventArgs.cs
- CodeAttributeArgument.cs
- IntPtr.cs
- DataGridViewButtonCell.cs
- ProcessHost.cs
- Form.cs
- VarInfo.cs
- ToolStripArrowRenderEventArgs.cs
- StreamUpdate.cs
- SimpleHandlerFactory.cs
- Renderer.cs
- UseAttributeSetsAction.cs
- ViewStateModeByIdAttribute.cs
- ServiceHttpHandlerFactory.cs
- WebPartDeleteVerb.cs
- StateBag.cs
- EnumConverter.cs
- MediaCommands.cs
- SqlClientPermission.cs
- UniqueConstraint.cs
- CellParagraph.cs
- WebRequestModulesSection.cs
- ReadOnlyNameValueCollection.cs
- XmlSecureResolver.cs
- SymmetricCryptoHandle.cs
- cache.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- Tokenizer.cs
- FacetChecker.cs
- FloaterBaseParaClient.cs
- MaskedTextProvider.cs
- RTLAwareMessageBox.cs
- MetadataLocation.cs
- StylusTip.cs
- SiteMembershipCondition.cs
- OracleString.cs
- RightsManagementEncryptionTransform.cs
- SHA256Managed.cs
- ByteStorage.cs
- ScriptComponentDescriptor.cs
- StandardToolWindows.cs
- DockProviderWrapper.cs
- SiteMapProvider.cs
- WindowCollection.cs
- AxisAngleRotation3D.cs
- FontStretch.cs
- DataGridSortingEventArgs.cs
- PropertyMetadata.cs
- DefaultObjectMappingItemCollection.cs
- FloaterParaClient.cs
- BrowserCapabilitiesFactoryBase.cs
- ActiveDocumentEvent.cs
- PropertyManager.cs
- Rectangle.cs
- EventLogger.cs
- XslCompiledTransform.cs
- ListViewGroupItemCollection.cs
- WebHttpEndpointElement.cs
- NativeMethodsOther.cs
- FileInfo.cs
- ObjectDataSourceEventArgs.cs
- StatusBarAutomationPeer.cs
- ChtmlLinkAdapter.cs
- FtpRequestCacheValidator.cs
- XmlNamespaceMappingCollection.cs
- WebPartDisplayModeCollection.cs
- SoapProtocolReflector.cs
- UIElement3D.cs
- TimelineCollection.cs
- Funcletizer.cs
- BitmapSource.cs
- LogRestartAreaEnumerator.cs
- SqlFlattener.cs
- ISO2022Encoding.cs
- SchemaTableOptionalColumn.cs
- NavigationCommands.cs
- WindowsEditBoxRange.cs