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
- DateTimeFormatInfo.cs
- FillErrorEventArgs.cs
- ConsumerConnectionPoint.cs
- StyleHelper.cs
- PeerApplicationLaunchInfo.cs
- AssemblyAttributes.cs
- HasCopySemanticsAttribute.cs
- RedirectionProxy.cs
- BatchWriter.cs
- WpfPayload.cs
- WorkflowDurableInstance.cs
- ImageSourceValueSerializer.cs
- ErrorWrapper.cs
- FilterableAttribute.cs
- Geometry.cs
- MD5Cng.cs
- CryptoKeySecurity.cs
- PersonalizationEntry.cs
- ToolboxBitmapAttribute.cs
- DocumentSequence.cs
- XmlImplementation.cs
- CommandField.cs
- EnumValAlphaComparer.cs
- ControlParameter.cs
- ExtensionWindowResizeGrip.cs
- HScrollBar.cs
- NameService.cs
- DataGridViewTextBoxEditingControl.cs
- Ppl.cs
- ToolBarPanel.cs
- SetIterators.cs
- _NegoStream.cs
- NCryptNative.cs
- AutomationFocusChangedEventArgs.cs
- CFStream.cs
- EncodingDataItem.cs
- BuildProvidersCompiler.cs
- RegexWriter.cs
- ListViewUpdateEventArgs.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- PropertyChangingEventArgs.cs
- DefinitionBase.cs
- Win32PrintDialog.cs
- RtType.cs
- TransactionProtocolConverter.cs
- Exceptions.cs
- FieldNameLookup.cs
- XamlFilter.cs
- CommandField.cs
- FullTextBreakpoint.cs
- SqlCacheDependencyDatabase.cs
- PropertyDescriptorComparer.cs
- XmlSchemaSimpleContentExtension.cs
- TreeNodeBinding.cs
- Trace.cs
- ExtendedProtectionPolicyTypeConverter.cs
- MediaContext.cs
- CodePrimitiveExpression.cs
- RightsManagementEncryptionTransform.cs
- HiddenField.cs
- XmlName.cs
- CheckableControlBaseAdapter.cs
- SimpleMailWebEventProvider.cs
- BaseCAMarshaler.cs
- UnmanagedMemoryStream.cs
- EntityContainerEntitySetDefiningQuery.cs
- PageWrapper.cs
- EntityReference.cs
- DataTableClearEvent.cs
- WebServiceMethodData.cs
- StandardOleMarshalObject.cs
- ZipFileInfoCollection.cs
- ADMembershipProvider.cs
- CompilerParameters.cs
- HtmlDocument.cs
- SBCSCodePageEncoding.cs
- BatchParser.cs
- SamlConstants.cs
- RequestResizeEvent.cs
- UserPreferenceChangingEventArgs.cs
- GroupBoxRenderer.cs
- Literal.cs
- XmlNodeReader.cs
- WindowsRichEdit.cs
- DynamicPropertyHolder.cs
- CodeCatchClause.cs
- UnsafeNativeMethods.cs
- XmlNamespaceManager.cs
- LocalFileSettingsProvider.cs
- CompensatableSequenceActivity.cs
- Vector3DConverter.cs
- ResetableIterator.cs
- AutomationElement.cs
- TableProviderWrapper.cs
- _SslStream.cs
- XmlRawWriterWrapper.cs
- StyleHelper.cs
- TargetInvocationException.cs
- IncomingWebResponseContext.cs
- safesecurityhelperavalon.cs