Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / 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
- MbpInfo.cs
- X509CertificateStore.cs
- IdnMapping.cs
- MultiByteCodec.cs
- XslTransformFileEditor.cs
- AuthenticatedStream.cs
- TransformerInfoCollection.cs
- KeyValueConfigurationCollection.cs
- TextDecorationLocationValidation.cs
- GridItemPattern.cs
- WindowsImpersonationContext.cs
- PersistenceTypeAttribute.cs
- EventLogPermissionAttribute.cs
- DataTrigger.cs
- ToolStripHighContrastRenderer.cs
- ObservableCollection.cs
- ScriptingSectionGroup.cs
- Section.cs
- SystemResourceHost.cs
- WSHttpBindingBaseElement.cs
- ReaderContextStackData.cs
- SchemaImporterExtensionElement.cs
- TextCollapsingProperties.cs
- BinaryFormatter.cs
- Tuple.cs
- PreProcessInputEventArgs.cs
- LocalIdCollection.cs
- Effect.cs
- HtmlTernaryTree.cs
- XmlUtf8RawTextWriter.cs
- SiteMembershipCondition.cs
- RadioButtonRenderer.cs
- UnmanagedMemoryStreamWrapper.cs
- UserControl.cs
- DocumentCollection.cs
- DocumentXmlWriter.cs
- EtwTrace.cs
- KerberosTicketHashIdentifierClause.cs
- EvidenceTypeDescriptor.cs
- EncoderParameters.cs
- HttpResponse.cs
- Cloud.cs
- RTLAwareMessageBox.cs
- Internal.cs
- HttpContext.cs
- StatusBarDesigner.cs
- HttpApplicationFactory.cs
- EdmConstants.cs
- ElementAction.cs
- MSG.cs
- StreamWithDictionary.cs
- XmlSchemaDatatype.cs
- FixedPageStructure.cs
- SizeF.cs
- UInt32Converter.cs
- SqlCacheDependencySection.cs
- SharedDp.cs
- Image.cs
- SignatureToken.cs
- NamedPermissionSet.cs
- XslUrlEditor.cs
- StylusPointPropertyId.cs
- SingleStorage.cs
- Transform.cs
- ApplicationHost.cs
- DataGridColumnCollection.cs
- DmlSqlGenerator.cs
- PropertyStore.cs
- SqlDelegatedTransaction.cs
- InputMethodStateChangeEventArgs.cs
- DbException.cs
- InkCanvasSelection.cs
- ColumnWidthChangingEvent.cs
- SessionParameter.cs
- ResourceSet.cs
- CurrentChangingEventArgs.cs
- AttributeUsageAttribute.cs
- StrongNamePublicKeyBlob.cs
- HtmlProps.cs
- DecimalAnimation.cs
- HttpSessionStateWrapper.cs
- SweepDirectionValidation.cs
- TreeView.cs
- SqlParameterizer.cs
- WebPartConnectionsCloseVerb.cs
- UmAlQuraCalendar.cs
- DoubleCollection.cs
- EmptyEnumerator.cs
- CredentialCache.cs
- CacheMemory.cs
- WebControlAdapter.cs
- ViewStateModeByIdAttribute.cs
- SortDescriptionCollection.cs
- SoapFaultCodes.cs
- XmlConvert.cs
- ChangeBlockUndoRecord.cs
- OutputCacheModule.cs
- UrlPath.cs
- safesecurityhelperavalon.cs
- PropertyChangedEventArgs.cs