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
- ToolStripScrollButton.cs
- LeaseManager.cs
- ControlAdapter.cs
- Section.cs
- WebResourceAttribute.cs
- IconConverter.cs
- RenderData.cs
- MaskedTextBox.cs
- DATA_BLOB.cs
- PeerContact.cs
- TagMapInfo.cs
- XmlIlVisitor.cs
- TextTreeUndo.cs
- ConstraintStruct.cs
- PseudoWebRequest.cs
- SqlUDTStorage.cs
- SevenBitStream.cs
- RuleElement.cs
- CuspData.cs
- RuleCache.cs
- Math.cs
- InputProcessorProfiles.cs
- CustomAttribute.cs
- ItemCheckedEvent.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- Debug.cs
- BaseAddressElementCollection.cs
- OutputCacheModule.cs
- AppDomain.cs
- ListViewPagedDataSource.cs
- followingquery.cs
- FontSizeConverter.cs
- InkCanvasSelection.cs
- ByteRangeDownloader.cs
- PeerNameRegistration.cs
- XmlParserContext.cs
- BrowserDefinitionCollection.cs
- SqlErrorCollection.cs
- OwnerDrawPropertyBag.cs
- EventMap.cs
- PropertyChangingEventArgs.cs
- ReturnEventArgs.cs
- CultureTable.cs
- TabControlAutomationPeer.cs
- SoapElementAttribute.cs
- BinaryObjectInfo.cs
- ConfigurationSectionGroupCollection.cs
- ContentPosition.cs
- OciLobLocator.cs
- ConnectionManagementSection.cs
- QuerySafeNavigator.cs
- GcSettings.cs
- WebPartConnectionsConfigureVerb.cs
- ListItemCollection.cs
- TabControl.cs
- WebPartMinimizeVerb.cs
- CustomError.cs
- PageContentAsyncResult.cs
- BrowserCapabilitiesFactory.cs
- VirtualPathUtility.cs
- DbResourceAllocator.cs
- PropertyChangedEventArgs.cs
- AsymmetricKeyExchangeDeformatter.cs
- SerTrace.cs
- StringUtil.cs
- TimeSpanConverter.cs
- BinaryFormatterSinks.cs
- HttpCacheVaryByContentEncodings.cs
- CopyNodeSetAction.cs
- UserControlParser.cs
- ToolboxCategory.cs
- GeneratedView.cs
- CursorConverter.cs
- DotExpr.cs
- DataObject.cs
- DependencyObjectType.cs
- filewebresponse.cs
- MD5.cs
- ListBase.cs
- ConvertEvent.cs
- OleDbStruct.cs
- LassoHelper.cs
- TreeNodeEventArgs.cs
- ExpressionBuilder.cs
- CompositeControl.cs
- ManagedFilter.cs
- FontStyle.cs
- DataFormat.cs
- TableStyle.cs
- TreeChangeInfo.cs
- AsyncCompletedEventArgs.cs
- TypedReference.cs
- HtmlFormWrapper.cs
- PrintPreviewControl.cs
- FlowLayout.cs
- SizeF.cs
- BitmapScalingModeValidation.cs
- NamespaceCollection.cs
- BinaryWriter.cs
- WarningException.cs