Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / Orcas / SP / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusButtonEventArgs.cs / 1 / StylusButtonEventArgs.cs
using System;
using System.Collections;
using System.ComponentModel;
using System.Windows.Media;
namespace System.Windows.Input
{
/////////////////////////////////////////////////////////////////////////
///
///Event argument used to subscribe to StylusButtonDown/Up events.
///The only information required to be passed by this argument is which button had the state change.
///
public class StylusButtonEventArgs : StylusEventArgs
{
/////////////////////////////////////////////////////////////////////
///
/// Initializes a new instance of the StylusButtonEventArgs class.
///
///
/// The logical Stylus device associated with this event.
///
///
/// The time when the input occured.
///
///
/// The button.
///
public StylusButtonEventArgs(
StylusDevice stylusDevice, int timestamp,
StylusButton button)
:
base(stylusDevice, timestamp)
{
// ISSUE_XiaoTu: Do we need any validation here?
_button = button;
}
///
/// Get the StylusButton
///
public StylusButton StylusButton
{
get
{
return _button;
}
}
/////////////////////////////////////////////////////////////////////
///
/// 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)
{
StylusButtonEventHandler handler = (StylusButtonEventHandler)genericHandler;
handler(genericTarget, this);
}
/////////////////////////////////////////////////////////////////////
///
StylusButton _button;
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
using System;
using System.Collections;
using System.ComponentModel;
using System.Windows.Media;
namespace System.Windows.Input
{
/////////////////////////////////////////////////////////////////////////
///
///Event argument used to subscribe to StylusButtonDown/Up events.
///The only information required to be passed by this argument is which button had the state change.
///
public class StylusButtonEventArgs : StylusEventArgs
{
/////////////////////////////////////////////////////////////////////
///
/// Initializes a new instance of the StylusButtonEventArgs class.
///
///
/// The logical Stylus device associated with this event.
///
///
/// The time when the input occured.
///
///
/// The button.
///
public StylusButtonEventArgs(
StylusDevice stylusDevice, int timestamp,
StylusButton button)
:
base(stylusDevice, timestamp)
{
// ISSUE_XiaoTu: Do we need any validation here?
_button = button;
}
///
/// Get the StylusButton
///
public StylusButton StylusButton
{
get
{
return _button;
}
}
/////////////////////////////////////////////////////////////////////
///
/// 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)
{
StylusButtonEventHandler handler = (StylusButtonEventHandler)genericHandler;
handler(genericTarget, this);
}
/////////////////////////////////////////////////////////////////////
///
StylusButton _button;
}
}
// 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
- UpnEndpointIdentityExtension.cs
- HatchBrush.cs
- ReliabilityContractAttribute.cs
- OracleConnectionFactory.cs
- ZipIOBlockManager.cs
- TypeInitializationException.cs
- NumberSubstitution.cs
- DbException.cs
- _LazyAsyncResult.cs
- MergeFilterQuery.cs
- Scene3D.cs
- JsonUriDataContract.cs
- LongValidatorAttribute.cs
- EntityDataSourceUtil.cs
- BaseResourcesBuildProvider.cs
- CompiledQueryCacheEntry.cs
- ImageCollectionCodeDomSerializer.cs
- TypeUtils.cs
- MetadataItemEmitter.cs
- Rfc2898DeriveBytes.cs
- COAUTHINFO.cs
- Model3D.cs
- SortKey.cs
- HyperLinkStyle.cs
- COM2ExtendedUITypeEditor.cs
- HttpContext.cs
- ResourceProviderFactory.cs
- DbConnectionInternal.cs
- GroupItemAutomationPeer.cs
- ScriptingWebServicesSectionGroup.cs
- SafeLibraryHandle.cs
- SendSecurityHeaderElement.cs
- WebPartMovingEventArgs.cs
- TrustManager.cs
- LinearKeyFrames.cs
- StylusCollection.cs
- QuaternionAnimationUsingKeyFrames.cs
- GeometryCollection.cs
- KeyEvent.cs
- relpropertyhelper.cs
- AsymmetricSignatureDeformatter.cs
- BigInt.cs
- CryptoHandle.cs
- XmlDomTextWriter.cs
- DependencyPropertyValueSerializer.cs
- SoapFormatter.cs
- PersonalizationStateInfo.cs
- SelectionItemProviderWrapper.cs
- TraversalRequest.cs
- AutomationElement.cs
- StyleBamlRecordReader.cs
- DbConnectionHelper.cs
- ZipIOExtraFieldElement.cs
- LongValidator.cs
- UIElement3DAutomationPeer.cs
- SafeIUnknown.cs
- RelationshipConverter.cs
- ModifierKeysConverter.cs
- Int16KeyFrameCollection.cs
- ObjectViewListener.cs
- RichTextBoxConstants.cs
- objectquery_tresulttype.cs
- OrderedDictionary.cs
- ApplicationServicesHostFactory.cs
- DrawingServices.cs
- ErrorStyle.cs
- XmlDataImplementation.cs
- XmlSchemaImport.cs
- PersonalizableAttribute.cs
- JapaneseCalendar.cs
- cache.cs
- URLMembershipCondition.cs
- NewExpression.cs
- DesignerAutoFormatStyle.cs
- NameValueCollection.cs
- BrowserDefinitionCollection.cs
- RelationshipConverter.cs
- HatchBrush.cs
- KerberosRequestorSecurityToken.cs
- XmlSerializationReader.cs
- IdnElement.cs
- XdrBuilder.cs
- StatusBarDrawItemEvent.cs
- AppSettingsExpressionBuilder.cs
- HealthMonitoringSection.cs
- SiteOfOriginContainer.cs
- BooleanFunctions.cs
- WebPartDisplayMode.cs
- CompilerInfo.cs
- RoleService.cs
- ResourceManager.cs
- HttpRawResponse.cs
- ScriptControl.cs
- DataControlFieldHeaderCell.cs
- DataGridViewRow.cs
- TextTreeUndo.cs
- ActivityWithResultValueSerializer.cs
- ProtectedConfigurationSection.cs
- ValidatorCollection.cs
- BamlLocalizableResourceKey.cs