Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- TextEditorTyping.cs
- TextAdaptor.cs
- XmlUTF8TextWriter.cs
- HtmlTableRow.cs
- EventBookmark.cs
- TextServicesDisplayAttributePropertyRanges.cs
- ServerIdentity.cs
- XmlSchemaObjectTable.cs
- CheckBox.cs
- GroupLabel.cs
- BatchWriter.cs
- SimpleNameService.cs
- WorkflowServiceHostFactory.cs
- MeasureItemEvent.cs
- AttributeCollection.cs
- GridItemProviderWrapper.cs
- Rect.cs
- Timer.cs
- RotateTransform3D.cs
- RuntimeVariablesExpression.cs
- BaseProcessProtocolHandler.cs
- ToolboxService.cs
- PerformanceCounterPermissionEntryCollection.cs
- DocumentOrderComparer.cs
- ProcessManager.cs
- MatrixTransform3D.cs
- WebPartZoneCollection.cs
- PeerEndPoint.cs
- ResponseStream.cs
- ListControl.cs
- PlacementWorkspace.cs
- XmlNamespaceDeclarationsAttribute.cs
- WsdlWriter.cs
- TimelineClockCollection.cs
- DocumentXPathNavigator.cs
- BinarySecretSecurityToken.cs
- FunctionMappingTranslator.cs
- EntityDataSource.cs
- GridItem.cs
- SqlDataSourceDesigner.cs
- SmiEventSink_DeferedProcessing.cs
- PersonalizationProviderCollection.cs
- DefaultValueTypeConverter.cs
- ManagementObjectSearcher.cs
- XamlTypeMapper.cs
- InlineUIContainer.cs
- DomNameTable.cs
- ToolStripItemImageRenderEventArgs.cs
- AxHost.cs
- XmlName.cs
- SoapConverter.cs
- SafeCoTaskMem.cs
- CorrelationExtension.cs
- UpdateProgress.cs
- OneOfElement.cs
- UpdateCommandGenerator.cs
- BufferedGraphics.cs
- GlyphRunDrawing.cs
- Regex.cs
- TextRunCacheImp.cs
- TraceContextRecord.cs
- GenericPrincipal.cs
- ConfigXmlDocument.cs
- TransformerConfigurationWizardBase.cs
- StyleCollection.cs
- Permission.cs
- DWriteFactory.cs
- WS2007FederationHttpBinding.cs
- CodeGenHelper.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- Baml6ConstructorInfo.cs
- SelectedPathEditor.cs
- MD5CryptoServiceProvider.cs
- RSAPKCS1SignatureDeformatter.cs
- Literal.cs
- LineGeometry.cs
- BaseServiceProvider.cs
- ContentPosition.cs
- ObjectSet.cs
- InputScopeConverter.cs
- AutoGeneratedFieldProperties.cs
- OpenTypeLayoutCache.cs
- UdpAnnouncementEndpoint.cs
- InternalCache.cs
- NetworkInformationPermission.cs
- SQLSingleStorage.cs
- SelectionWordBreaker.cs
- RequestCachePolicy.cs
- LayoutInformation.cs
- LexicalChunk.cs
- SqlReferenceCollection.cs
- FigureParaClient.cs
- HttpCachePolicy.cs
- HostedAspNetEnvironment.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- ServiceEndpointElementCollection.cs
- BaseDataListComponentEditor.cs
- SqlFacetAttribute.cs
- ListViewGroup.cs
- SystemResourceHost.cs