Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / PreProcessInputEventArgs.cs / 1305600 / PreProcessInputEventArgs.cs
using System;
using System.Security.Permissions;
using System.Security;
namespace System.Windows.Input
{
///
/// Allows the handler to cancel the processing of an input event.
///
///
/// An instance of this class is passed to the handlers of the
/// following events:
///
/// -
///
///
///
///
public sealed class PreProcessInputEventArgs : ProcessInputEventArgs
{
// Only we can make these. Note that we cache and reuse instances.
internal PreProcessInputEventArgs() {}
///
/// Critical calls ProcessInputEventArgs.Reset ( critical as it handles InputManager)
///
[SecurityCritical]
internal override void Reset(StagingAreaInputItem input, InputManager inputManager)
{
_canceled = false;
base.Reset(input, inputManager);
}
///
/// Cancels the processing of the input event.
///
public void Cancel()
{
_canceled = true;
}
///
/// Whether or not the input event processing was canceled.
///
public bool Canceled {get {return _canceled;}}
private bool _canceled;
}
///
/// Delegate type for handles of events that use
/// .
///
public delegate void PreProcessInputEventHandler(object sender, PreProcessInputEventArgs e);
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Security.Permissions;
using System.Security;
namespace System.Windows.Input
{
///
/// Allows the handler to cancel the processing of an input event.
///
///
/// An instance of this class is passed to the handlers of the
/// following events:
///
/// -
///
///
///
///
public sealed class PreProcessInputEventArgs : ProcessInputEventArgs
{
// Only we can make these. Note that we cache and reuse instances.
internal PreProcessInputEventArgs() {}
///
/// Critical calls ProcessInputEventArgs.Reset ( critical as it handles InputManager)
///
[SecurityCritical]
internal override void Reset(StagingAreaInputItem input, InputManager inputManager)
{
_canceled = false;
base.Reset(input, inputManager);
}
///
/// Cancels the processing of the input event.
///
public void Cancel()
{
_canceled = true;
}
///
/// Whether or not the input event processing was canceled.
///
public bool Canceled {get {return _canceled;}}
private bool _canceled;
}
///
/// Delegate type for handles of events that use
/// .
///
public delegate void PreProcessInputEventHandler(object sender, PreProcessInputEventArgs e);
}
// 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
- ThicknessAnimation.cs
- GeometryModel3D.cs
- GenericArgumentsUpdater.cs
- CollectionViewGroupRoot.cs
- DataPagerFieldCommandEventArgs.cs
- WarningException.cs
- XmlHelper.cs
- MetafileEditor.cs
- HotSpotCollection.cs
- LayoutEditorPart.cs
- Triplet.cs
- ResourceContainer.cs
- ComPlusServiceLoader.cs
- DownloadProgressEventArgs.cs
- ClientSideQueueItem.cs
- ExecutionScope.cs
- Pkcs9Attribute.cs
- CounterCreationDataCollection.cs
- WebConfigurationHostFileChange.cs
- Button.cs
- BaseAsyncResult.cs
- PassportAuthentication.cs
- ExternalFile.cs
- ZipIOCentralDirectoryDigitalSignature.cs
- future.cs
- SynchronousChannelMergeEnumerator.cs
- DataGridViewRowHeaderCell.cs
- Deserializer.cs
- RelatedPropertyManager.cs
- StaticResourceExtension.cs
- OutgoingWebResponseContext.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- ImpersonationContext.cs
- CoreSwitches.cs
- CFGGrammar.cs
- DataGridViewHeaderCell.cs
- TargetControlTypeCache.cs
- ScrollItemPatternIdentifiers.cs
- ContextQuery.cs
- assertwrapper.cs
- SafeNativeMethods.cs
- EventLogger.cs
- HttpFileCollection.cs
- EventLogPermission.cs
- SqlWebEventProvider.cs
- BoundingRectTracker.cs
- PathStreamGeometryContext.cs
- SQLBinaryStorage.cs
- DelayedRegex.cs
- BitmapCache.cs
- TextSearch.cs
- CompilerCollection.cs
- Column.cs
- EditorPartChrome.cs
- DetailsViewDesigner.cs
- HashHelper.cs
- SecurityTokenAuthenticator.cs
- CaseInsensitiveComparer.cs
- TableDesigner.cs
- WindowsListViewScroll.cs
- DPCustomTypeDescriptor.cs
- SequenceFullException.cs
- CustomErrorCollection.cs
- ProgressChangedEventArgs.cs
- PolygonHotSpot.cs
- Errors.cs
- Label.cs
- Quaternion.cs
- OleDbInfoMessageEvent.cs
- ComplexTypeEmitter.cs
- AssemblyBuilderData.cs
- Version.cs
- MediaScriptCommandRoutedEventArgs.cs
- ClientSideQueueItem.cs
- RawUIStateInputReport.cs
- SettingsPropertyIsReadOnlyException.cs
- TextFormatterHost.cs
- ActivityFunc.cs
- FunctionImportElement.cs
- DockPatternIdentifiers.cs
- BooleanAnimationBase.cs
- Int16KeyFrameCollection.cs
- TemplateXamlParser.cs
- RegexRunner.cs
- LockedAssemblyCache.cs
- TransactionChannel.cs
- WindowsSysHeader.cs
- _HeaderInfo.cs
- ILGenerator.cs
- StateBag.cs
- TargetParameterCountException.cs
- PrincipalPermission.cs
- Token.cs
- X509Chain.cs
- EnumBuilder.cs
- ToolStripDropTargetManager.cs
- CodeTypeReferenceSerializer.cs
- ValueUnavailableException.cs
- SQLInt16.cs
- DiscardableAttribute.cs