Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- Subtree.cs
- PerformanceCounterCategory.cs
- RtfFormatStack.cs
- columnmapfactory.cs
- ActivityWithResultWrapper.cs
- XmlDataDocument.cs
- NotFiniteNumberException.cs
- TaskScheduler.cs
- ReaderWriterLockSlim.cs
- FixUpCollection.cs
- HierarchicalDataSourceIDConverter.cs
- GridViewRowEventArgs.cs
- SourceExpressionException.cs
- XmlQueryCardinality.cs
- WebBrowserContainer.cs
- LongValidatorAttribute.cs
- DnsPermission.cs
- NonVisualControlAttribute.cs
- CompressedStack.cs
- ListItem.cs
- HashHelper.cs
- DataGridViewCellLinkedList.cs
- ButtonPopupAdapter.cs
- GridViewColumnHeader.cs
- propertytag.cs
- EncodingDataItem.cs
- DataColumnMappingCollection.cs
- MemberInfoSerializationHolder.cs
- CookieProtection.cs
- FileDataSourceCache.cs
- OracleEncoding.cs
- AtomicFile.cs
- EncodingTable.cs
- DataGridViewCellStyleChangedEventArgs.cs
- HotCommands.cs
- GiveFeedbackEventArgs.cs
- FullTextState.cs
- PasswordPropertyTextAttribute.cs
- WebPartEditVerb.cs
- AnchoredBlock.cs
- Selector.cs
- HMACMD5.cs
- NullRuntimeConfig.cs
- XmlEventCache.cs
- ClientType.cs
- InkPresenter.cs
- SQLConvert.cs
- ModuleElement.cs
- Literal.cs
- GrammarBuilder.cs
- SharedTcpTransportManager.cs
- UnsafeNativeMethods.cs
- CfgRule.cs
- DefaultValueAttribute.cs
- ComAdminInterfaces.cs
- RC2.cs
- WinEventHandler.cs
- WebBrowserSiteBase.cs
- FileDialog.cs
- PointLightBase.cs
- EndCreateSecurityTokenRequest.cs
- TypeUnloadedException.cs
- Visitor.cs
- AuthenticationException.cs
- rsa.cs
- RestHandler.cs
- TypeConstant.cs
- RawStylusInput.cs
- ACL.cs
- StringAnimationUsingKeyFrames.cs
- ComboBoxAutomationPeer.cs
- ValidatorUtils.cs
- FontWeightConverter.cs
- ObjectDisposedException.cs
- GZipUtils.cs
- PersistenceTypeAttribute.cs
- DbConnectionPoolIdentity.cs
- CodeFieldReferenceExpression.cs
- GifBitmapEncoder.cs
- ManagementEventWatcher.cs
- DecimalSumAggregationOperator.cs
- StylusButtonEventArgs.cs
- EndEvent.cs
- ContextBase.cs
- QilLoop.cs
- DoubleAnimationBase.cs
- QuaternionAnimationBase.cs
- DispatcherFrame.cs
- MemberListBinding.cs
- Rotation3D.cs
- CompressionTransform.cs
- RectangleHotSpot.cs
- DoubleCollectionValueSerializer.cs
- SortQueryOperator.cs
- PageBreakRecord.cs
- AdornerHitTestResult.cs
- Condition.cs
- GenericFlowSwitchHelper.cs
- ExpressionSelection.cs
- BooleanConverter.cs