Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / 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 [....]/connecteddata/Specs/Validation.mht
//
// History:
// 5/13/2004 [....]: 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 is a new error
/// or a previous error that has now been cleared.
///
public ValidationErrorEventAction Action
{
get
{
return _action;
}
}
///
/// 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)
{
EventHandler handler = (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
- CodeAttributeDeclarationCollection.cs
- CopyOfAction.cs
- CrossContextChannel.cs
- CharStorage.cs
- followingquery.cs
- SqlDataReaderSmi.cs
- EventManager.cs
- MessageTransmitTraceRecord.cs
- InvalidDataException.cs
- IriParsingElement.cs
- DockAndAnchorLayout.cs
- FileSecurity.cs
- WebPartVerbsEventArgs.cs
- Trace.cs
- ReferencedAssemblyResolver.cs
- BaseTemplateParser.cs
- WebAdminConfigurationHelper.cs
- PartialCachingControl.cs
- diagnosticsswitches.cs
- DataGridTableCollection.cs
- IpcChannel.cs
- ExpressionBuilder.cs
- XPathExpr.cs
- UrlPropertyAttribute.cs
- HyperLinkStyle.cs
- ReadOnlyHierarchicalDataSource.cs
- TextServicesDisplayAttributePropertyRanges.cs
- StringResourceManager.cs
- MapPathBasedVirtualPathProvider.cs
- PinnedBufferMemoryStream.cs
- ChtmlFormAdapter.cs
- GenerateDerivedKeyRequest.cs
- RSAPKCS1SignatureDeformatter.cs
- AppLevelCompilationSectionCache.cs
- SqlCaseSimplifier.cs
- XmlElementList.cs
- ConnectionPoolManager.cs
- PipeSecurity.cs
- MimeXmlImporter.cs
- InkPresenterAutomationPeer.cs
- WebPartUtil.cs
- VisualStyleElement.cs
- SequentialOutput.cs
- ComponentGlyph.cs
- ChildDocumentBlock.cs
- Stylesheet.cs
- DBSqlParser.cs
- ContextBase.cs
- SqlOuterApplyReducer.cs
- CultureInfoConverter.cs
- SqlDataReader.cs
- TextSegment.cs
- WebServiceReceive.cs
- TraceHwndHost.cs
- MachineKeySection.cs
- ErrorTableItemStyle.cs
- ControlCommandSet.cs
- SafeTimerHandle.cs
- ListControlActionList.cs
- DiffuseMaterial.cs
- MemberPath.cs
- Rijndael.cs
- NativeActivityTransactionContext.cs
- GridItemPattern.cs
- DesignerProperties.cs
- PeerCollaboration.cs
- BindingFormattingDialog.cs
- XmlIgnoreAttribute.cs
- _UncName.cs
- TTSVoice.cs
- AppSecurityManager.cs
- AnimationClock.cs
- SpeechDetectedEventArgs.cs
- ArraySegment.cs
- TakeQueryOptionExpression.cs
- IResourceProvider.cs
- RuleRef.cs
- ShapingEngine.cs
- AssemblyResourceLoader.cs
- TypeSystem.cs
- ReadOnlyCollectionBase.cs
- MediaContext.cs
- LogStore.cs
- XmlDictionaryReaderQuotas.cs
- TemplateControlParser.cs
- BindingNavigator.cs
- OleDbParameterCollection.cs
- AnonymousIdentificationSection.cs
- MulticastNotSupportedException.cs
- DynamicResourceExtension.cs
- TreeView.cs
- ServiceNameCollection.cs
- Regex.cs
- Cast.cs
- ScalarRestriction.cs
- SecurityPermission.cs
- FeatureSupport.cs
- AlphabeticalEnumConverter.cs
- WorkflowMarkupSerializationManager.cs
- CodeCompiler.cs