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
- ListComponentEditor.cs
- WebPageTraceListener.cs
- IUnknownConstantAttribute.cs
- RemoteWebConfigurationHost.cs
- WebRequestModuleElement.cs
- SchemaTableOptionalColumn.cs
- ColumnHeader.cs
- WizardSideBarListControlItem.cs
- ToolStripItemTextRenderEventArgs.cs
- CellTreeNode.cs
- AssemblyResourceLoader.cs
- SelectedCellsCollection.cs
- AttributeSetAction.cs
- DataBoundControlHelper.cs
- DeviceSpecific.cs
- DesignerActionItem.cs
- Int16.cs
- HijriCalendar.cs
- PropertyManager.cs
- AppModelKnownContentFactory.cs
- SafeCryptContextHandle.cs
- FormsAuthenticationModule.cs
- QueryTreeBuilder.cs
- Substitution.cs
- Operator.cs
- StsCommunicationException.cs
- ResourceWriter.cs
- PointLight.cs
- DirectoryRootQuery.cs
- TableLayoutCellPaintEventArgs.cs
- PowerModeChangedEventArgs.cs
- PageEventArgs.cs
- QilInvoke.cs
- ResourceIDHelper.cs
- StatusBarDrawItemEvent.cs
- BaseTemplateCodeDomTreeGenerator.cs
- securitycriticaldataClass.cs
- metadatamappinghashervisitor.cs
- DispatcherSynchronizationContext.cs
- DefaultValueAttribute.cs
- ScriptManagerProxy.cs
- VScrollBar.cs
- WmpBitmapDecoder.cs
- Ops.cs
- XmlBindingWorker.cs
- SwitchElementsCollection.cs
- XmlTextReaderImplHelpers.cs
- PixelFormatConverter.cs
- XhtmlBasicCommandAdapter.cs
- GeneralTransformGroup.cs
- TextBox.cs
- EdmSchemaAttribute.cs
- ProxyGenerationError.cs
- ToolStripSystemRenderer.cs
- ReadOnlyHierarchicalDataSource.cs
- BulletDecorator.cs
- Bits.cs
- WorkflowTransactionService.cs
- HttpCookieCollection.cs
- SqlAliasesReferenced.cs
- TypeBuilder.cs
- CollectionViewProxy.cs
- HttpListenerElement.cs
- BaseCAMarshaler.cs
- PrivilegeNotHeldException.cs
- RangeBaseAutomationPeer.cs
- DoWhile.cs
- PeerPresenceInfo.cs
- ValidationErrorEventArgs.cs
- AlignmentXValidation.cs
- XmlDocumentFragment.cs
- NamespaceList.cs
- SQLBytesStorage.cs
- IDQuery.cs
- SystemIPGlobalProperties.cs
- ProfileGroupSettingsCollection.cs
- HtmlMeta.cs
- Assert.cs
- BuildDependencySet.cs
- ParagraphVisual.cs
- TemplateBamlRecordReader.cs
- BaseProcessor.cs
- FlatButtonAppearance.cs
- JavaScriptString.cs
- SkipQueryOptionExpression.cs
- OrderedDictionaryStateHelper.cs
- CollectionChangeEventArgs.cs
- TokenizerHelper.cs
- ParallelDesigner.cs
- PerfCounterSection.cs
- ModelPerspective.cs
- StateRuntime.cs
- TextEditorTyping.cs
- ObjectManager.cs
- HtmlProps.cs
- ScriptingProfileServiceSection.cs
- PolicyLevel.cs
- IPEndPoint.cs
- SurrogateSelector.cs
- RoleGroup.cs