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
- SparseMemoryStream.cs
- RSACryptoServiceProvider.cs
- ToolStripTextBox.cs
- IssuanceLicense.cs
- RequestCachingSection.cs
- ApplicationDirectoryMembershipCondition.cs
- FileStream.cs
- __TransparentProxy.cs
- SplitContainer.cs
- RelationshipNavigation.cs
- mongolianshape.cs
- HotCommands.cs
- JavaScriptSerializer.cs
- FrugalMap.cs
- CustomErrorCollection.cs
- MetadataUtilsSmi.cs
- FormViewPageEventArgs.cs
- Unit.cs
- DataGridRowsPresenter.cs
- XhtmlCssHandler.cs
- DataControlFieldHeaderCell.cs
- TreeViewImageKeyConverter.cs
- hresults.cs
- MultiBinding.cs
- TextFindEngine.cs
- WindowAutomationPeer.cs
- FlagsAttribute.cs
- FlowDocumentScrollViewer.cs
- SystemMulticastIPAddressInformation.cs
- AttributeUsageAttribute.cs
- ExpressionBuilderContext.cs
- TrackingQueryElement.cs
- _HeaderInfo.cs
- SqlTypeConverter.cs
- MouseGestureValueSerializer.cs
- RangeValidator.cs
- TextPenaltyModule.cs
- SynchronizationScope.cs
- SoundPlayerAction.cs
- Button.cs
- TriggerCollection.cs
- TableCellCollection.cs
- TagPrefixCollection.cs
- Image.cs
- LoginViewDesigner.cs
- CubicEase.cs
- ModulesEntry.cs
- GPStream.cs
- SystemIPv6InterfaceProperties.cs
- StartFileNameEditor.cs
- SystemResourceHost.cs
- QuotedStringFormatReader.cs
- WebResourceAttribute.cs
- ShaderEffect.cs
- VectorAnimation.cs
- _NegoStream.cs
- ToolStripSplitStackLayout.cs
- Atom10FormatterFactory.cs
- UxThemeWrapper.cs
- CheckBoxField.cs
- MarginCollapsingState.cs
- OdbcConnection.cs
- HtmlButton.cs
- MenuItemCollection.cs
- ReferenceConverter.cs
- XsdDuration.cs
- DataRecordObjectView.cs
- CommandHelper.cs
- CallbackException.cs
- CellLabel.cs
- DataGridViewTopRowAccessibleObject.cs
- _CommandStream.cs
- TypeDescriptor.cs
- UserPreferenceChangedEventArgs.cs
- GeneralTransform3D.cs
- XmlHierarchicalDataSourceView.cs
- CharacterShapingProperties.cs
- SmiEventSink_DeferedProcessing.cs
- ConfigurationProperty.cs
- SimpleColumnProvider.cs
- ToolStripRendererSwitcher.cs
- UnknownBitmapEncoder.cs
- AggregateNode.cs
- ChannelManagerBase.cs
- CodeStatementCollection.cs
- HealthMonitoringSection.cs
- ContractTypeNameElement.cs
- NativeMethods.cs
- _CacheStreams.cs
- BasePattern.cs
- SecurityAccessDeniedException.cs
- CustomError.cs
- ApplicationActivator.cs
- FormattedText.cs
- HandlerFactoryWrapper.cs
- BitConverter.cs
- SoapExtensionStream.cs
- UniqueConstraint.cs
- QuotedPrintableStream.cs
- RawStylusInputReport.cs