Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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 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.
//----------------------------------------------------------------------------
//
//
// 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 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
- DataGridViewLinkColumn.cs
- AdornerPresentationContext.cs
- ScriptBehaviorDescriptor.cs
- GeneralTransform2DTo3D.cs
- DocumentScope.cs
- SoapReflectionImporter.cs
- ReverseComparer.cs
- LinqDataSourceView.cs
- SmtpAuthenticationManager.cs
- PerspectiveCamera.cs
- ResourceCategoryAttribute.cs
- DirectoryObjectSecurity.cs
- HelpProvider.cs
- BaseParagraph.cs
- _NegotiateClient.cs
- NoneExcludedImageIndexConverter.cs
- HwndProxyElementProvider.cs
- CompiledRegexRunnerFactory.cs
- SemanticBasicElement.cs
- AutomationEventArgs.cs
- ExtenderControl.cs
- DetailsView.cs
- TabletDevice.cs
- TableCell.cs
- PersianCalendar.cs
- UserPreferenceChangedEventArgs.cs
- SystemWebCachingSectionGroup.cs
- CustomActivityDesigner.cs
- SerializationInfoEnumerator.cs
- EntityDataSourceChangedEventArgs.cs
- BaseCollection.cs
- TreeIterator.cs
- AppendHelper.cs
- TextDpi.cs
- ButtonStandardAdapter.cs
- GrammarBuilderBase.cs
- BufferedReadStream.cs
- AVElementHelper.cs
- ResourceDescriptionAttribute.cs
- AvtEvent.cs
- ServiceEndpointCollection.cs
- HyperLinkField.cs
- TaiwanCalendar.cs
- IPCCacheManager.cs
- ReaderWriterLock.cs
- CounterCreationData.cs
- RemoteWebConfigurationHostStream.cs
- NotifyIcon.cs
- TableParaClient.cs
- MessageQueuePermission.cs
- HTTPAPI_VERSION.cs
- WindowsComboBox.cs
- HttpRawResponse.cs
- BitmapEffectInputData.cs
- WebUtil.cs
- diagnosticsswitches.cs
- FixedTextView.cs
- Point3D.cs
- filewebresponse.cs
- SqlRowUpdatedEvent.cs
- HeaderCollection.cs
- IisHelper.cs
- SizeLimitedCache.cs
- FilteredXmlReader.cs
- XmlNavigatorFilter.cs
- OleServicesContext.cs
- HwndKeyboardInputProvider.cs
- Stream.cs
- LinqDataSourceValidationException.cs
- MediaScriptCommandRoutedEventArgs.cs
- PageParserFilter.cs
- ParserContext.cs
- ListInitExpression.cs
- RecognitionResult.cs
- XmlTextReaderImpl.cs
- SqlDataSourceView.cs
- UpdateExpressionVisitor.cs
- SchemaElement.cs
- Utils.cs
- EventProperty.cs
- PageThemeParser.cs
- PersonalizablePropertyEntry.cs
- CreateUserWizardStep.cs
- PermissionToken.cs
- CodeFieldReferenceExpression.cs
- Popup.cs
- UnionQueryOperator.cs
- ResourceManager.cs
- errorpatternmatcher.cs
- PartialCachingControl.cs
- NumericUpDown.cs
- NetworkInterface.cs
- Latin1Encoding.cs
- mediaeventargs.cs
- ResourcesBuildProvider.cs
- webeventbuffer.cs
- RepeaterItemEventArgs.cs
- WindowsProgressbar.cs
- Constants.cs
- PropertyConverter.cs