Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusEventArgs.cs / 1305600 / StylusEventArgs.cs
using System; using System.Collections; using System.Windows.Media; namespace System.Windows.Input { ///////////////////////////////////////////////////////////////////////// ////// The StylusEventArgs class provides access to the logical /// Stylus device for all derived event args. /// public class StylusEventArgs : InputEventArgs { ///////////////////////////////////////////////////////////////////// ////// Initializes a new instance of the StylusEventArgs class. /// /// /// The logical Stylus device associated with this event. /// /// /// The time when the input occured. /// public StylusEventArgs(StylusDevice stylus, int timestamp) : base(stylus, timestamp) { if( stylus == null ) { throw new System.ArgumentNullException("stylus"); } } ///////////////////////////////////////////////////////////////////// ////// Read-only access to the stylus device associated with this /// event. /// public StylusDevice StylusDevice { get { return (StylusDevice)this.Device; } } ///////////////////////////////////////////////////////////////////// ////// Calculates the position of the stylus relative to a particular element. /// public Point GetPosition(IInputElement relativeTo) { return StylusDevice.GetPosition(relativeTo); } ///////////////////////////////////////////////////////////////////// ////// Indicates the stylus is not touching the surface. /// public bool InAir { get { return StylusDevice.InAir; } } ///////////////////////////////////////////////////////////////////// ////// Indicates stylusDevice is in the inverted state. /// public bool Inverted { get { return StylusDevice.Inverted; } } ///////////////////////////////////////////////////////////////////// ////// Returns a StylusPointCollection for processing the data from input. /// This method creates a new StylusPointCollection and copies the data. /// public StylusPointCollection GetStylusPoints(IInputElement relativeTo) { return StylusDevice.GetStylusPoints(relativeTo); } ///////////////////////////////////////////////////////////////////// ////// Returns a StylusPointCollection for processing the data from input. /// This method creates a new StylusPointCollection and copies the data. /// public StylusPointCollection GetStylusPoints(IInputElement relativeTo, StylusPointDescription subsetToReformatTo) { return StylusDevice.GetStylusPoints(relativeTo, subsetToReformatTo); } ///////////////////////////////////////////////////////////////////// ////// 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) { StylusEventHandler handler = (StylusEventHandler) genericHandler; handler(genericTarget, this); } ///////////////////////////////////////////////////////////////////// internal RawStylusInputReport InputReport { get { return _inputReport; } set { _inputReport = value; } } ///////////////////////////////////////////////////////////////////// RawStylusInputReport _inputReport; } } // 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
- UIElement3D.cs
- GraphicsPathIterator.cs
- Compress.cs
- Margins.cs
- CustomErrorCollection.cs
- IntSecurity.cs
- RegexWriter.cs
- XmlLanguage.cs
- ByteStreamGeometryContext.cs
- AssemblyBuilder.cs
- Enum.cs
- LoginUtil.cs
- Dispatcher.cs
- MouseDevice.cs
- DataSet.cs
- TypeUtils.cs
- Internal.cs
- ReadOnlyDataSource.cs
- DetailsViewRowCollection.cs
- SafeSecurityHelper.cs
- URI.cs
- __FastResourceComparer.cs
- TraceUtils.cs
- ObjectMemberMapping.cs
- XmlDocumentFragment.cs
- XmlEventCache.cs
- RecognizedPhrase.cs
- SystemUnicastIPAddressInformation.cs
- PanningMessageFilter.cs
- SpellerStatusTable.cs
- StylusDevice.cs
- PriorityItem.cs
- ConfigurationException.cs
- Grant.cs
- TripleDES.cs
- XmlSchemaAttribute.cs
- Menu.cs
- ConstraintManager.cs
- Matrix.cs
- UpdateManifestForBrowserApplication.cs
- ModuleElement.cs
- DataSpaceManager.cs
- ImageSource.cs
- SafeBitVector32.cs
- WorkflowMarkupElementEventArgs.cs
- HGlobalSafeHandle.cs
- Point4D.cs
- ReturnEventArgs.cs
- AlignmentXValidation.cs
- WebServiceResponseDesigner.cs
- CornerRadiusConverter.cs
- MouseButtonEventArgs.cs
- StreamReader.cs
- InterleavedZipPartStream.cs
- Help.cs
- SelectionService.cs
- DoubleLinkList.cs
- CollectionsUtil.cs
- DataGridViewDataErrorEventArgs.cs
- AuthenticationException.cs
- Reference.cs
- StickyNoteHelper.cs
- ProgressBarAutomationPeer.cs
- AdRotatorDesigner.cs
- StatusStrip.cs
- SamlAssertionKeyIdentifierClause.cs
- ZoomComboBox.cs
- RecipientInfo.cs
- TdsParameterSetter.cs
- ClientSettingsProvider.cs
- Double.cs
- ToolBarButtonClickEvent.cs
- EntityViewGenerationAttribute.cs
- SequentialUshortCollection.cs
- invalidudtexception.cs
- SizeAnimationUsingKeyFrames.cs
- ExpandedProjectionNode.cs
- TransformerInfoCollection.cs
- DataMemberAttribute.cs
- LinkUtilities.cs
- FixedTextBuilder.cs
- LambdaExpression.cs
- FormViewDeleteEventArgs.cs
- Line.cs
- AsymmetricKeyExchangeFormatter.cs
- WeakReference.cs
- KnownTypesProvider.cs
- MdiWindowListItemConverter.cs
- SimpleBitVector32.cs
- CmsInterop.cs
- ObjectComplexPropertyMapping.cs
- WebPartMinimizeVerb.cs
- JournalNavigationScope.cs
- RuntimeWrappedException.cs
- ConfigurationSectionCollection.cs
- ClosureBinding.cs
- StrongNameIdentityPermission.cs
- WindowAutomationPeer.cs
- GeneralTransform2DTo3DTo2D.cs
- VirtualPathExtension.cs