Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- FixedTextSelectionProcessor.cs
- activationcontext.cs
- AppearanceEditorPart.cs
- DependsOnAttribute.cs
- glyphs.cs
- UIElementCollection.cs
- ParameterModifier.cs
- SpecialTypeDataContract.cs
- TextReader.cs
- ADRole.cs
- Parameter.cs
- ButtonBaseAdapter.cs
- HashStream.cs
- TableLayoutStyleCollection.cs
- CssClassPropertyAttribute.cs
- DesignerActionService.cs
- FieldMetadata.cs
- BmpBitmapEncoder.cs
- QilPatternFactory.cs
- DataServiceKeyAttribute.cs
- util.cs
- PopupEventArgs.cs
- ResourceReferenceExpression.cs
- SelectionWordBreaker.cs
- CodeLabeledStatement.cs
- SmiRecordBuffer.cs
- TextTreeNode.cs
- MSHTMLHost.cs
- Preprocessor.cs
- DescriptionAttribute.cs
- SystemIcons.cs
- DataGridColumnCollection.cs
- ToolStripRendererSwitcher.cs
- QueryResponse.cs
- RunClient.cs
- WindowsRebar.cs
- SizeChangedEventArgs.cs
- CounterCreationData.cs
- GroupBox.cs
- ReadOnlyMetadataCollection.cs
- SpellerStatusTable.cs
- ImageCollectionCodeDomSerializer.cs
- MoveSizeWinEventHandler.cs
- COSERVERINFO.cs
- ToolStripTextBox.cs
- HtmlContainerControl.cs
- ColumnPropertiesGroup.cs
- ObjectDataSourceMethodEventArgs.cs
- SQLDateTime.cs
- OracleDataAdapter.cs
- WindowsFont.cs
- EndpointBehaviorElementCollection.cs
- DataGridViewRowStateChangedEventArgs.cs
- CardSpaceException.cs
- KeyProperty.cs
- CanonicalXml.cs
- ClientScriptManager.cs
- _BaseOverlappedAsyncResult.cs
- WebPartDeleteVerb.cs
- BaseHashHelper.cs
- AccessibleObject.cs
- CryptoProvider.cs
- Decorator.cs
- DropShadowBitmapEffect.cs
- BitmapEffectDrawingContextWalker.cs
- SQLGuidStorage.cs
- AttributeCollection.cs
- DropDownList.cs
- IsolatedStorageFile.cs
- UnionCodeGroup.cs
- CodeLabeledStatement.cs
- TabControlCancelEvent.cs
- SessionStateItemCollection.cs
- InternalPolicyElement.cs
- Pen.cs
- AttachInfo.cs
- FieldInfo.cs
- OperationAbortedException.cs
- SimpleTypeResolver.cs
- AuthenticationConfig.cs
- XMLSyntaxException.cs
- XpsPartBase.cs
- CapabilitiesPattern.cs
- DbParameterCollectionHelper.cs
- ReversePositionQuery.cs
- ColorInterpolationModeValidation.cs
- DataGridHelper.cs
- AssemblyHash.cs
- _AuthenticationState.cs
- LineGeometry.cs
- ISCIIEncoding.cs
- WizardForm.cs
- AuthenticationModulesSection.cs
- ReflectPropertyDescriptor.cs
- PresentationAppDomainManager.cs
- RangeBaseAutomationPeer.cs
- DragSelectionMessageFilter.cs
- FrameworkContentElement.cs
- BorderGapMaskConverter.cs
- DataKeyArray.cs