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
- XmlSchemaAll.cs
- FilterableAttribute.cs
- CapabilitiesRule.cs
- Security.cs
- EventProviderClassic.cs
- OptimizedTemplateContentHelper.cs
- Matrix.cs
- ListComponentEditorPage.cs
- InternalDispatchObject.cs
- XmlDictionaryReader.cs
- FormatException.cs
- TrustSection.cs
- ListDataHelper.cs
- LogRecordSequence.cs
- ValueOfAction.cs
- RequestQueue.cs
- DependencyPropertyHelper.cs
- WebPartEditorOkVerb.cs
- OdbcParameterCollection.cs
- AsyncStreamReader.cs
- ActivityExecutionContext.cs
- ToolStripItemImageRenderEventArgs.cs
- TextTreePropertyUndoUnit.cs
- Repeater.cs
- connectionpool.cs
- DataList.cs
- CryptoHelper.cs
- NonClientArea.cs
- CollectionEditor.cs
- DynamicDiscoSearcher.cs
- PrimitiveOperationFormatter.cs
- CompilerCollection.cs
- ServiceProviders.cs
- HttpStreamMessage.cs
- ConfigurationSectionCollection.cs
- _ReceiveMessageOverlappedAsyncResult.cs
- XsltArgumentList.cs
- PreviewPrintController.cs
- FixedPageStructure.cs
- MetricEntry.cs
- BindingObserver.cs
- NavigationPropertyAccessor.cs
- MinMaxParagraphWidth.cs
- NestedContainer.cs
- PageHandlerFactory.cs
- BindingMAnagerBase.cs
- MimePart.cs
- ToolStripItemImageRenderEventArgs.cs
- UnsafeNativeMethods.cs
- PenThreadWorker.cs
- PasswordBoxAutomationPeer.cs
- RichTextBox.cs
- DataGridViewCell.cs
- ManipulationPivot.cs
- GraphicsPath.cs
- XmlDataImplementation.cs
- ImplicitInputBrush.cs
- MessageTraceRecord.cs
- ProcessModelSection.cs
- GridViewDesigner.cs
- ShapingWorkspace.cs
- HashMembershipCondition.cs
- UrlAuthFailedErrorFormatter.cs
- HTTPRemotingHandler.cs
- WindowsStartMenu.cs
- GetWinFXPath.cs
- Graph.cs
- GlyphRunDrawing.cs
- RegisteredArrayDeclaration.cs
- WSHttpSecurityElement.cs
- Accessible.cs
- validation.cs
- ExceptionUtil.cs
- MarginCollapsingState.cs
- CacheSection.cs
- SectionUpdates.cs
- HiddenFieldPageStatePersister.cs
- KoreanLunisolarCalendar.cs
- CellRelation.cs
- SqlBooleanizer.cs
- CustomActivityDesigner.cs
- ClientProtocol.cs
- XslCompiledTransform.cs
- DataGridViewRowHeightInfoPushedEventArgs.cs
- HttpHeaderCollection.cs
- SelectionGlyph.cs
- ScriptReferenceBase.cs
- DocumentViewerBaseAutomationPeer.cs
- EntityKey.cs
- ServerType.cs
- DataGridViewCellStyleChangedEventArgs.cs
- SqlClientFactory.cs
- DefaultValueAttribute.cs
- SafeHandles.cs
- ServiceOperationParameter.cs
- DBConnectionString.cs
- Blend.cs
- PixelFormats.cs
- ApplicationId.cs
- SoapInteropTypes.cs