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
- WorkflowCompensationBehavior.cs
- ListenerConfig.cs
- ChildTable.cs
- DockingAttribute.cs
- DesignerProperties.cs
- DataTemplateKey.cs
- RsaKeyIdentifierClause.cs
- ListItemConverter.cs
- SoapTypeAttribute.cs
- HuffModule.cs
- InitialServerConnectionReader.cs
- BitmapEffectGroup.cs
- Compiler.cs
- SequentialOutput.cs
- IERequestCache.cs
- XmlSchemaFacet.cs
- Ops.cs
- TempFiles.cs
- TargetInvocationException.cs
- MenuItem.cs
- XmlSortKeyAccumulator.cs
- XmlSchemaExternal.cs
- EventLogHandle.cs
- WindowsFormsHelpers.cs
- Metadata.cs
- SuppressMergeCheckAttribute.cs
- CatalogZoneBase.cs
- ReceiveContextCollection.cs
- ComponentResourceManager.cs
- MetadataSerializer.cs
- TreeViewImageIndexConverter.cs
- BackgroundWorker.cs
- DetailsViewUpdatedEventArgs.cs
- BaseCollection.cs
- Models.cs
- ContextMenuStripGroupCollection.cs
- PropertyItemInternal.cs
- PageThemeBuildProvider.cs
- PerspectiveCamera.cs
- DesignerVerbToolStripMenuItem.cs
- DesignerAdapterAttribute.cs
- ApplicationBuildProvider.cs
- ListManagerBindingsCollection.cs
- ElementMarkupObject.cs
- SqlDataSource.cs
- BoundsDrawingContextWalker.cs
- MimeParameter.cs
- OperationParameterInfo.cs
- XMLSyntaxException.cs
- TextTreePropertyUndoUnit.cs
- NameGenerator.cs
- QueryCursorEventArgs.cs
- Rect.cs
- CLSCompliantAttribute.cs
- _StreamFramer.cs
- StringDictionary.cs
- BaseConfigurationRecord.cs
- SplitterEvent.cs
- FieldBuilder.cs
- LocatorPart.cs
- EtwProvider.cs
- CalendarDay.cs
- DependencySource.cs
- PersonalizationStateInfo.cs
- TypeDelegator.cs
- CodeAccessSecurityEngine.cs
- PropertyItemInternal.cs
- WebServiceErrorEvent.cs
- CheckStoreFileValidityRequest.cs
- DrawingBrush.cs
- ConfigurationProperty.cs
- AlgoModule.cs
- AvTraceFormat.cs
- ForceCopyBuildProvider.cs
- URLAttribute.cs
- MarkupCompilePass2.cs
- hebrewshape.cs
- ControlParameter.cs
- UnmanagedMemoryStreamWrapper.cs
- WindowsFont.cs
- ReliabilityContractAttribute.cs
- IconConverter.cs
- XmlBoundElement.cs
- CaseStatement.cs
- ToolStripSeparator.cs
- StorageEntityTypeMapping.cs
- Operand.cs
- IntSumAggregationOperator.cs
- SessionIDManager.cs
- ContextMenuAutomationPeer.cs
- CreateUserErrorEventArgs.cs
- AliasGenerator.cs
- MsmqQueue.cs
- StaticContext.cs
- EventListenerClientSide.cs
- DynamicUpdateCommand.cs
- DataGridViewRowPrePaintEventArgs.cs
- ViewCellRelation.cs
- ReferenceEqualityComparer.cs
- CqlGenerator.cs