Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // // 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
- RangeContentEnumerator.cs
- AstTree.cs
- FigureParagraph.cs
- RuntimeWrappedException.cs
- NameTable.cs
- LinqDataSourceStatusEventArgs.cs
- XmlSchemaAnnotated.cs
- XmlSchemaDocumentation.cs
- TableLayoutPanelCodeDomSerializer.cs
- XPathNodeIterator.cs
- SettingsProperty.cs
- XmlWriterDelegator.cs
- Transform3DCollection.cs
- SoapInteropTypes.cs
- DbMetaDataFactory.cs
- ClientSideQueueItem.cs
- PackageFilter.cs
- WebPartMenu.cs
- MethodBuilder.cs
- LeftCellWrapper.cs
- SoapElementAttribute.cs
- DashStyle.cs
- QuaternionConverter.cs
- DispatcherSynchronizationContext.cs
- SafeFileHandle.cs
- ListControl.cs
- ProxyElement.cs
- EncodingInfo.cs
- ParameterCollection.cs
- WebPartEditVerb.cs
- RootBuilder.cs
- ParameterBuilder.cs
- EntityDataReader.cs
- FontUnitConverter.cs
- DateTimeStorage.cs
- XmlSchema.cs
- XmlWrappingWriter.cs
- ConfigurationSettings.cs
- VsPropertyGrid.cs
- DrawToolTipEventArgs.cs
- BamlResourceContent.cs
- MappingSource.cs
- WindowsListViewItemCheckBox.cs
- MarkupExtensionSerializer.cs
- storagemappingitemcollection.viewdictionary.cs
- StorageScalarPropertyMapping.cs
- DelegateSerializationHolder.cs
- WinEventTracker.cs
- TextTreeFixupNode.cs
- DbXmlEnabledProviderManifest.cs
- AttachmentCollection.cs
- ProtocolsConfigurationEntry.cs
- PerfService.cs
- ContentIterators.cs
- HttpCapabilitiesEvaluator.cs
- ClientCredentialsElement.cs
- Timer.cs
- StandardBindingReliableSessionElement.cs
- Propagator.JoinPropagator.SubstitutingCloneVisitor.cs
- Missing.cs
- HwndSourceKeyboardInputSite.cs
- __Error.cs
- DynamicPropertyReader.cs
- SettingsPropertyCollection.cs
- HTMLTextWriter.cs
- ContentHostHelper.cs
- ColumnClickEvent.cs
- Serializer.cs
- XmlChildNodes.cs
- ValidationHelpers.cs
- RijndaelManagedTransform.cs
- ConfigurationLocation.cs
- VirtualPathProvider.cs
- TextDecorations.cs
- ScriptReference.cs
- ModifiableIteratorCollection.cs
- DocumentViewerConstants.cs
- SecurityPolicySection.cs
- AlignmentYValidation.cs
- TranslateTransform.cs
- MultilineStringEditor.cs
- XslCompiledTransform.cs
- MexBindingElement.cs
- ViewBase.cs
- BuilderPropertyEntry.cs
- FixedPosition.cs
- SectionInput.cs
- ExtensionSimplifierMarkupObject.cs
- RootBuilder.cs
- _LocalDataStoreMgr.cs
- FtpCachePolicyElement.cs
- PageCatalogPartDesigner.cs
- RecognizeCompletedEventArgs.cs
- parserscommon.cs
- SmiGettersStream.cs
- GridViewEditEventArgs.cs
- RewritingPass.cs
- VariableQuery.cs
- ErrorWrapper.cs
- BamlRecordReader.cs