Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusButtonEventArgs.cs / 1305600 / 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
- QuinticEase.cs
- SettingsAttributes.cs
- DelegatedStream.cs
- ControlEvent.cs
- ArrayTypeMismatchException.cs
- CrossAppDomainChannel.cs
- OdbcStatementHandle.cs
- TableStyle.cs
- SelectionWordBreaker.cs
- DefaultClaimSet.cs
- SecurityChannelFaultConverter.cs
- FilterQuery.cs
- PropertyDescriptorComparer.cs
- DecoratedNameAttribute.cs
- OdbcEnvironmentHandle.cs
- CompiledIdentityConstraint.cs
- TypeTypeConverter.cs
- FontFamilyIdentifier.cs
- PersistChildrenAttribute.cs
- PeerApplication.cs
- RuntimeTransactionHandle.cs
- ThreadStateException.cs
- IndexedSelectQueryOperator.cs
- TrackBarRenderer.cs
- ClientConfigurationSystem.cs
- SuppressMessageAttribute.cs
- TreeView.cs
- SqlInternalConnection.cs
- DataGridViewTextBoxColumn.cs
- DbProviderFactory.cs
- ProfessionalColors.cs
- arabicshape.cs
- Ray3DHitTestResult.cs
- PeerNearMe.cs
- GeometryConverter.cs
- PerformanceCounterLib.cs
- CompositionCommandSet.cs
- ZipIOExtraFieldZip64Element.cs
- ThicknessConverter.cs
- DispatcherProcessingDisabled.cs
- NativeMethods.cs
- HandleExceptionArgs.cs
- SortAction.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- IntegerFacetDescriptionElement.cs
- SqlCacheDependencyDatabase.cs
- WaitHandleCannotBeOpenedException.cs
- WindowsMenu.cs
- ListSortDescriptionCollection.cs
- SchemaContext.cs
- XmlUtf8RawTextWriter.cs
- GridLengthConverter.cs
- ThreadExceptionDialog.cs
- OdbcCommand.cs
- WmlSelectionListAdapter.cs
- OdbcConnectionFactory.cs
- SoapSchemaMember.cs
- Script.cs
- CodeDomDecompiler.cs
- ClientScriptManager.cs
- HostVisual.cs
- NegationPusher.cs
- XmlNamespaceMapping.cs
- IisTraceWebEventProvider.cs
- MouseOverProperty.cs
- ValidationErrorEventArgs.cs
- Literal.cs
- SamlAudienceRestrictionCondition.cs
- TimelineClockCollection.cs
- IconEditor.cs
- ToolTip.cs
- KeyToListMap.cs
- DataGridViewCellValidatingEventArgs.cs
- IIS7UserPrincipal.cs
- DataGridClipboardCellContent.cs
- ClientScriptManagerWrapper.cs
- ISSmlParser.cs
- TypeConverterHelper.cs
- Convert.cs
- PerformanceCounterPermissionAttribute.cs
- MultipartContentParser.cs
- ProcessHostMapPath.cs
- InfoCardUIAgent.cs
- DataGridViewRowEventArgs.cs
- ZipIOLocalFileHeader.cs
- BufferedWebEventProvider.cs
- EqualityArray.cs
- InnerItemCollectionView.cs
- MsmqUri.cs
- HwndSubclass.cs
- baseaxisquery.cs
- CompoundFileStorageReference.cs
- LocalBuilder.cs
- PropertyCollection.cs
- IOException.cs
- TraceRecord.cs
- SiteIdentityPermission.cs
- OutputCacheModule.cs
- EncryptRequest.cs
- DateTimeOffset.cs