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
- MatrixTransform3D.cs
- MetadataArtifactLoaderFile.cs
- ScriptControl.cs
- CacheRequest.cs
- DisposableCollectionWrapper.cs
- FixedPageAutomationPeer.cs
- CSharpCodeProvider.cs
- Stack.cs
- SafeArrayRankMismatchException.cs
- LayoutInformation.cs
- TreeView.cs
- SamlNameIdentifierClaimResource.cs
- HttpDebugHandler.cs
- ColumnHeaderConverter.cs
- SocketElement.cs
- RuntimeArgumentHandle.cs
- FilterFactory.cs
- RunInstallerAttribute.cs
- SafeHandle.cs
- Point4DValueSerializer.cs
- EditBehavior.cs
- Point.cs
- DataSourceDescriptorCollection.cs
- WindowsTab.cs
- LinqDataSourceValidationException.cs
- ActiveXHelper.cs
- InvalidPrinterException.cs
- HitTestParameters3D.cs
- CharacterMetricsDictionary.cs
- FlowDocumentFormatter.cs
- StreamResourceInfo.cs
- ExecutionScope.cs
- HostingPreferredMapPath.cs
- PrintDialog.cs
- AggregateNode.cs
- RadioButtonFlatAdapter.cs
- FontStretch.cs
- fixedPageContentExtractor.cs
- Listbox.cs
- XamlPointCollectionSerializer.cs
- TemplateField.cs
- SecureStringHasher.cs
- BitmapEffect.cs
- IBuiltInEvidence.cs
- CallSiteBinder.cs
- DesignerDataStoredProcedure.cs
- CompiledXpathExpr.cs
- VirtualStackFrame.cs
- TextBoxRenderer.cs
- MatrixConverter.cs
- Compiler.cs
- DataGridViewCellCollection.cs
- MessageHeader.cs
- RSAPKCS1SignatureFormatter.cs
- DragCompletedEventArgs.cs
- MonikerProxyAttribute.cs
- HtmlInputButton.cs
- AppSettingsExpressionBuilder.cs
- BuildProvider.cs
- PassportPrincipal.cs
- UDPClient.cs
- UInt64Storage.cs
- FontStretches.cs
- ArgumentOutOfRangeException.cs
- ViewStateException.cs
- TableStyle.cs
- StateDesigner.Layouts.cs
- URLAttribute.cs
- Stacktrace.cs
- CollectionConverter.cs
- WindowProviderWrapper.cs
- SqlClientWrapperSmiStream.cs
- ToolStripControlHost.cs
- MessageBox.cs
- LabelEditEvent.cs
- PlanCompiler.cs
- RequiredFieldValidator.cs
- ArgumentOutOfRangeException.cs
- WebServiceBindingAttribute.cs
- TrackingProfileCache.cs
- HtmlInputReset.cs
- HostedHttpContext.cs
- XamlTemplateSerializer.cs
- RangeValueProviderWrapper.cs
- DataGridViewRowCancelEventArgs.cs
- SessionIDManager.cs
- PropertyValueUIItem.cs
- ImportCatalogPart.cs
- TreeNodeMouseHoverEvent.cs
- DynamicMethod.cs
- Preprocessor.cs
- Wildcard.cs
- XsdValidatingReader.cs
- AuthenticationService.cs
- BulletChrome.cs
- StateMachineExecutionState.cs
- TransformPattern.cs
- BindingCollection.cs
- CancelEventArgs.cs
- MaskDescriptors.cs