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
- SkewTransform.cs
- StorageMappingFragment.cs
- DataShape.cs
- GeneralTransform.cs
- ReferenceEqualityComparer.cs
- ComponentDispatcher.cs
- RolePrincipal.cs
- ScrollChangedEventArgs.cs
- ServiceNameElement.cs
- Number.cs
- ContractUtils.cs
- XmlSchemaInferenceException.cs
- AuthenticationModuleElementCollection.cs
- CanonicalXml.cs
- GridViewColumnHeaderAutomationPeer.cs
- FixedDocument.cs
- BinaryCommonClasses.cs
- EncodingTable.cs
- UpdateCommandGenerator.cs
- List.cs
- CreateUserErrorEventArgs.cs
- Thickness.cs
- PropertyStore.cs
- ObjectQueryProvider.cs
- ThreadBehavior.cs
- InProcStateClientManager.cs
- EmitterCache.cs
- ConstructorNeedsTagAttribute.cs
- EntityObject.cs
- WebBrowserPermission.cs
- QuerySettings.cs
- ComponentChangedEvent.cs
- ColorAnimationUsingKeyFrames.cs
- MailMessageEventArgs.cs
- RequiredFieldValidator.cs
- CodeTypeReferenceExpression.cs
- ConnectorSelectionGlyph.cs
- AuthorizationRuleCollection.cs
- DesignerAdapterUtil.cs
- CodeSubDirectory.cs
- Literal.cs
- SymLanguageType.cs
- ThaiBuddhistCalendar.cs
- UnsafeMethods.cs
- HttpStreams.cs
- FontFamilyConverter.cs
- ResourcePermissionBase.cs
- TextEndOfSegment.cs
- DataBindingHandlerAttribute.cs
- PageThemeBuildProvider.cs
- HttpCachePolicyElement.cs
- PersonalizationStateInfo.cs
- TypeReference.cs
- BitmapEffectCollection.cs
- DesignerMetadata.cs
- InvalidDataException.cs
- GeometryCollection.cs
- Merger.cs
- ObjectQueryExecutionPlan.cs
- PackWebRequestFactory.cs
- IisTraceWebEventProvider.cs
- FileUtil.cs
- ContentPlaceHolder.cs
- ReadOnlyAttribute.cs
- RegexNode.cs
- Border.cs
- odbcmetadatacolumnnames.cs
- EntityKeyElement.cs
- ButtonFlatAdapter.cs
- MouseDevice.cs
- XmlCollation.cs
- AddInController.cs
- TileModeValidation.cs
- DbConnectionPoolCounters.cs
- CodeMemberMethod.cs
- SymDocumentType.cs
- HostingEnvironmentSection.cs
- ConstraintCollection.cs
- FloatMinMaxAggregationOperator.cs
- Helper.cs
- CompositionAdorner.cs
- QuaternionRotation3D.cs
- UpdateCompiler.cs
- Duration.cs
- SendMailErrorEventArgs.cs
- SchemaNamespaceManager.cs
- FtpRequestCacheValidator.cs
- ChangePassword.cs
- AccessDataSource.cs
- PeerResolverSettings.cs
- TextViewElement.cs
- LayoutEditorPart.cs
- XmlSerializerSection.cs
- ColumnMap.cs
- ImageInfo.cs
- Clause.cs
- XmlNodeChangedEventManager.cs
- ThicknessAnimation.cs
- PackageDigitalSignature.cs
- IChannel.cs