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
- FutureFactory.cs
- SubpageParagraph.cs
- AccessibleObject.cs
- TouchFrameEventArgs.cs
- XmlNamespaceMappingCollection.cs
- XPathPatternParser.cs
- FontSizeConverter.cs
- OletxCommittableTransaction.cs
- PrintingPermission.cs
- HostingEnvironmentWrapper.cs
- DesignerTransaction.cs
- AdPostCacheSubstitution.cs
- KeyGesture.cs
- TypeNameConverter.cs
- MDIWindowDialog.cs
- CurrentChangedEventManager.cs
- BitmapFrame.cs
- ReadOnlyMetadataCollection.cs
- ClaimTypeRequirement.cs
- OletxEnlistment.cs
- DefaultSettingsSection.cs
- GACIdentityPermission.cs
- WebRequestModuleElementCollection.cs
- dataprotectionpermissionattribute.cs
- RuleInfoComparer.cs
- TimelineGroup.cs
- IIS7UserPrincipal.cs
- InProcStateClientManager.cs
- TextModifierScope.cs
- JoinSymbol.cs
- QueryOptionExpression.cs
- DocumentViewerAutomationPeer.cs
- StrongName.cs
- TextRenderingModeValidation.cs
- DataIdProcessor.cs
- SwitchElementsCollection.cs
- ComboBoxRenderer.cs
- NodeInfo.cs
- TextElement.cs
- Int32Animation.cs
- validationstate.cs
- _HeaderInfoTable.cs
- OdbcConnectionString.cs
- ScriptingWebServicesSectionGroup.cs
- DefaultValueTypeConverter.cs
- XmlElementAttributes.cs
- SessionState.cs
- AspNetSynchronizationContext.cs
- FrameworkTemplate.cs
- UIElementCollection.cs
- CodeSubDirectory.cs
- ScriptControl.cs
- RangeValidator.cs
- Padding.cs
- RC2.cs
- IRCollection.cs
- HMACSHA512.cs
- GeometryModel3D.cs
- OutputChannelBinder.cs
- Dynamic.cs
- SurrogateEncoder.cs
- EntityContainer.cs
- Marshal.cs
- ConfigDefinitionUpdates.cs
- HttpCachePolicyElement.cs
- ChangeDirector.cs
- ScriptManagerProxy.cs
- MaskedTextBoxDesignerActionList.cs
- FloatUtil.cs
- CompilerHelpers.cs
- SamlAudienceRestrictionCondition.cs
- ValueType.cs
- UpdateDelegates.Generated.cs
- SoapSchemaExporter.cs
- ProcessProtocolHandler.cs
- RoamingStoreFile.cs
- CorrelationManager.cs
- CommandDevice.cs
- Logging.cs
- DataGridViewToolTip.cs
- WebZone.cs
- DocumentGrid.cs
- CrossAppDomainChannel.cs
- Visual3D.cs
- PackageFilter.cs
- CompositeDataBoundControl.cs
- PublishLicense.cs
- CodeMethodReturnStatement.cs
- XmlIterators.cs
- DataViewManager.cs
- TemplateBindingExtension.cs
- ClientSponsor.cs
- AVElementHelper.cs
- EncryptedPackageFilter.cs
- UInt32Storage.cs
- UInt64Converter.cs
- ByteAnimation.cs
- LinqDataSourceSelectEventArgs.cs
- StaticDataManager.cs
- ListBoxAutomationPeer.cs