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
- CallbackWrapper.cs
- ArgIterator.cs
- DataSetFieldSchema.cs
- InvalidOleVariantTypeException.cs
- ProfileModule.cs
- DebugInfoExpression.cs
- IDispatchConstantAttribute.cs
- StyleSelector.cs
- HMAC.cs
- WindowsTitleBar.cs
- PerformanceCounterManager.cs
- StandardCommandToolStripMenuItem.cs
- Roles.cs
- KeyValuePair.cs
- BooleanConverter.cs
- GPStream.cs
- SoundPlayerAction.cs
- SoapAttributeOverrides.cs
- LockRecursionException.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- FontNameConverter.cs
- ControlLocalizer.cs
- ContextInformation.cs
- Light.cs
- MobileErrorInfo.cs
- TreeViewImageKeyConverter.cs
- TextRunCache.cs
- TableItemProviderWrapper.cs
- X509CertificateTrustedIssuerElement.cs
- StorageRoot.cs
- externdll.cs
- StrongNameKeyPair.cs
- SqlUtil.cs
- WebPartEditorCancelVerb.cs
- MissingMethodException.cs
- WebPartDescription.cs
- XmlSerializerSection.cs
- SchemaElementLookUpTable.cs
- MultipleViewProviderWrapper.cs
- NativeCppClassAttribute.cs
- SelectionWordBreaker.cs
- DataGridViewHeaderCell.cs
- Reference.cs
- TrackingProfileDeserializationException.cs
- CodeGenerator.cs
- ScrollItemPattern.cs
- VisualCollection.cs
- XmlBindingWorker.cs
- DataReaderContainer.cs
- ToolboxItemLoader.cs
- SynchronizedInputPattern.cs
- ToolZone.cs
- DynamicMetaObjectBinder.cs
- Table.cs
- ContentFileHelper.cs
- UriExt.cs
- OrderPreservingSpoolingTask.cs
- ApplicationActivator.cs
- ObjectReaderCompiler.cs
- WebPartConnectVerb.cs
- DataGridColumnCollection.cs
- XMLSchema.cs
- StylusDevice.cs
- SelectionGlyphBase.cs
- ListItemCollection.cs
- NavigationProperty.cs
- DefaultValueTypeConverter.cs
- ValidatedMobileControlConverter.cs
- SqlWebEventProvider.cs
- ListSortDescription.cs
- precedingsibling.cs
- BufferModesCollection.cs
- BaseParagraph.cs
- PropertyValueChangedEvent.cs
- WithStatement.cs
- Privilege.cs
- QueryStringParameter.cs
- DrawingState.cs
- XmlQuerySequence.cs
- SplashScreenNativeMethods.cs
- XmlDocument.cs
- WeakRefEnumerator.cs
- RuleProcessor.cs
- XsltOutput.cs
- ListViewItemEventArgs.cs
- ProofTokenCryptoHandle.cs
- PlatformCulture.cs
- SmtpFailedRecipientException.cs
- PathFigureCollectionValueSerializer.cs
- FormsAuthenticationCredentials.cs
- XslAst.cs
- FusionWrap.cs
- WebPermission.cs
- FileSystemInfo.cs
- TypeToTreeConverter.cs
- ContextCorrelationInitializer.cs
- RegexNode.cs
- PseudoWebRequest.cs
- Attributes.cs
- FontFamilyIdentifier.cs