Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / 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
- SelectionEditingBehavior.cs
- NavigationProperty.cs
- FragmentNavigationEventArgs.cs
- LoginView.cs
- SqlNodeAnnotations.cs
- AsymmetricKeyExchangeFormatter.cs
- DragEventArgs.cs
- SqlExpressionNullability.cs
- DataKeyArray.cs
- DataContractSerializer.cs
- SequentialWorkflowHeaderFooter.cs
- ResourceIDHelper.cs
- ObjectStateEntryDbUpdatableDataRecord.cs
- RectangleHotSpot.cs
- IsolatedStorageException.cs
- PrefixHandle.cs
- HttpWrapper.cs
- Rijndael.cs
- InputReport.cs
- EventPropertyMap.cs
- WindowsRichEdit.cs
- PromptStyle.cs
- ExceptionUtil.cs
- SiteOfOriginPart.cs
- Reference.cs
- CodeCompiler.cs
- SynchronizedDispatch.cs
- CharAnimationUsingKeyFrames.cs
- StateDesigner.TransitionInfo.cs
- DataObjectSettingDataEventArgs.cs
- ToolStripDropDown.cs
- RemotingSurrogateSelector.cs
- TriggerActionCollection.cs
- ToolStripContentPanel.cs
- ZoneIdentityPermission.cs
- TextLineBreak.cs
- ListViewItemEventArgs.cs
- DataConnectionHelper.cs
- TriggerActionCollection.cs
- InternalsVisibleToAttribute.cs
- StrokeCollectionDefaultValueFactory.cs
- FormDesigner.cs
- StaticTextPointer.cs
- DllHostInitializer.cs
- OpenTypeLayoutCache.cs
- InternalTransaction.cs
- SqlMethodAttribute.cs
- OleAutBinder.cs
- DecoderExceptionFallback.cs
- QilGeneratorEnv.cs
- MILUtilities.cs
- UnsafeNativeMethodsCLR.cs
- OpCodes.cs
- CqlIdentifiers.cs
- GroupJoinQueryOperator.cs
- GroupBoxDesigner.cs
- PropagatorResult.cs
- ConfigurationLoader.cs
- ActivityCodeDomSerializer.cs
- ConfigsHelper.cs
- SelectionEditingBehavior.cs
- SiteMapDataSourceView.cs
- Profiler.cs
- ContentElementCollection.cs
- AttributeCallbackBuilder.cs
- PassportPrincipal.cs
- DataServiceRequestException.cs
- pingexception.cs
- XmlSchemaAttributeGroupRef.cs
- __ComObject.cs
- RootBuilder.cs
- DesignerCategoryAttribute.cs
- Processor.cs
- IEnumerable.cs
- FontCollection.cs
- StorageAssociationTypeMapping.cs
- ServiceOperationInvoker.cs
- XsltLibrary.cs
- CompleteWizardStep.cs
- PrincipalPermission.cs
- DiffuseMaterial.cs
- ScrollChangedEventArgs.cs
- TypeViewSchema.cs
- parserscommon.cs
- HtmlInputText.cs
- BodyGlyph.cs
- GridLength.cs
- EventDescriptorCollection.cs
- DateRangeEvent.cs
- ViewStateException.cs
- BitStack.cs
- HttpListenerContext.cs
- ObjectViewQueryResultData.cs
- IPAddress.cs
- TextRunTypographyProperties.cs
- DeferredSelectedIndexReference.cs
- BinaryNode.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- DodSequenceMerge.cs
- MediaPlayer.cs