Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / System / Windows / Input / Stylus / StylusEventArgs.cs / 1 / 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. 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
- PropertyExpression.cs
- HeaderUtility.cs
- ExpressionConverter.cs
- BidirectionalDictionary.cs
- XmlSchemaCompilationSettings.cs
- DataGridViewRowStateChangedEventArgs.cs
- wpf-etw.cs
- FileSystemEventArgs.cs
- AssemblyNameUtility.cs
- ServiceTimeoutsElement.cs
- ObjRef.cs
- ActivitySurrogate.cs
- DependencyObjectType.cs
- SafeSecurityHandles.cs
- Monitor.cs
- StorageTypeMapping.cs
- TraceContextEventArgs.cs
- ReflectionUtil.cs
- DbFunctionCommandTree.cs
- ListCardsInFileRequest.cs
- securitycriticaldata.cs
- TemplateBindingExpressionConverter.cs
- DataServicePagingProviderWrapper.cs
- BindingSource.cs
- _OverlappedAsyncResult.cs
- ContainerSelectorActiveEvent.cs
- HtmlSelect.cs
- EDesignUtil.cs
- Stackframe.cs
- FormattedTextSymbols.cs
- XmlUTF8TextWriter.cs
- RoleGroupCollectionEditor.cs
- XmlDeclaration.cs
- IdnMapping.cs
- XmlCompatibilityReader.cs
- EntityTypeBase.cs
- DoubleUtil.cs
- MenuItemCollectionEditor.cs
- ResourceManager.cs
- AspNetCompatibilityRequirementsMode.cs
- ProbeMatchesApril2005.cs
- EdmScalarPropertyAttribute.cs
- WebPartConnectVerb.cs
- BackStopAuthenticationModule.cs
- TextEditorCharacters.cs
- CryptoApi.cs
- Debug.cs
- StreamUpdate.cs
- PathParser.cs
- ToolStripOverflow.cs
- CodeDelegateInvokeExpression.cs
- EmptyEnumerable.cs
- DateTimeValueSerializerContext.cs
- Matrix3D.cs
- _SafeNetHandles.cs
- RegistryPermission.cs
- SpecularMaterial.cs
- WebBrowsableAttribute.cs
- ComboBoxItem.cs
- GlyphShapingProperties.cs
- SessionStateSection.cs
- FixUpCollection.cs
- XmlElement.cs
- RealizationContext.cs
- XmlDataContract.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- RefExpr.cs
- OracleCommandBuilder.cs
- DataGridViewColumnCollectionEditor.cs
- MaskedTextBoxDesigner.cs
- DPAPIProtectedConfigurationProvider.cs
- FixedSOMTable.cs
- FixedHighlight.cs
- FormsAuthenticationModule.cs
- ping.cs
- WindowsGrip.cs
- Transform3D.cs
- DefaultValueConverter.cs
- Scanner.cs
- MarkerProperties.cs
- DetailsViewDeletedEventArgs.cs
- QuaternionRotation3D.cs
- BaseParaClient.cs
- StoreItemCollection.Loader.cs
- Encoding.cs
- PlatformCulture.cs
- ProfileService.cs
- UnknownWrapper.cs
- EdmComplexPropertyAttribute.cs
- HandlerBase.cs
- DefaultAsyncDataDispatcher.cs
- CurrencyManager.cs
- PerformanceCounterPermissionEntryCollection.cs
- ProfileSection.cs
- ThicknessAnimationBase.cs
- WindowsListViewScroll.cs
- LineMetrics.cs
- Renderer.cs
- CacheAxisQuery.cs
- VBIdentifierTrimConverter.cs