Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RTLAwareMessageBox.cs
- RegexInterpreter.cs
- ConfigurationPermission.cs
- WMIGenerator.cs
- DashStyle.cs
- DeobfuscatingStream.cs
- MsmqTransportSecurityElement.cs
- TraceUtility.cs
- OutputScopeManager.cs
- SwitchLevelAttribute.cs
- SplashScreen.cs
- ErrorHandler.cs
- ExpressionEditorAttribute.cs
- CodeNamespaceImportCollection.cs
- SiteMapDesignerDataSourceView.cs
- CompositeDataBoundControl.cs
- PowerModeChangedEventArgs.cs
- CodeCompiler.cs
- SerializationInfoEnumerator.cs
- FontUnit.cs
- LicenseContext.cs
- TypeConvertions.cs
- IDQuery.cs
- SelectedDatesCollection.cs
- ManifestResourceInfo.cs
- BaseCAMarshaler.cs
- safelinkcollection.cs
- SqlDelegatedTransaction.cs
- Content.cs
- messageonlyhwndwrapper.cs
- UnitySerializationHolder.cs
- NumberFormatInfo.cs
- XPathMultyIterator.cs
- ConfigXmlAttribute.cs
- RowToParametersTransformer.cs
- IRCollection.cs
- RevocationPoint.cs
- Roles.cs
- FieldAccessException.cs
- DemultiplexingDispatchMessageFormatter.cs
- ComponentChangingEvent.cs
- MergeFilterQuery.cs
- ActiveXSerializer.cs
- Exceptions.cs
- DatePickerTextBox.cs
- DataGridViewCellEventArgs.cs
- CodeArrayCreateExpression.cs
- XmlDictionary.cs
- Stylesheet.cs
- WebGetAttribute.cs
- DescendantBaseQuery.cs
- PartialCachingControl.cs
- PerfCounterSection.cs
- SemanticValue.cs
- SelectedGridItemChangedEvent.cs
- WsatConfiguration.cs
- AuthenticationSection.cs
- DataServiceConfiguration.cs
- PanelStyle.cs
- URLBuilder.cs
- SqlCaseSimplifier.cs
- ListItemConverter.cs
- DesignerAutoFormat.cs
- WeakRefEnumerator.cs
- ObjectPersistData.cs
- CodeDomComponentSerializationService.cs
- ProfilePropertyNameValidator.cs
- FixedSOMTableCell.cs
- ReturnEventArgs.cs
- ObjectAnimationUsingKeyFrames.cs
- FixedLineResult.cs
- TableLayoutRowStyleCollection.cs
- SqlGenericUtil.cs
- Configuration.cs
- DirectoryObjectSecurity.cs
- HttpListener.cs
- EventArgs.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- returneventsaver.cs
- ResXFileRef.cs
- BindingOperations.cs
- RawStylusInput.cs
- CodeAssignStatement.cs
- IndexedString.cs
- SecurityResources.cs
- elementinformation.cs
- SqlDuplicator.cs
- PersianCalendar.cs
- XmlSchemaImport.cs
- XmlLangPropertyAttribute.cs
- IndexExpression.cs
- EventHandlerList.cs
- BufferAllocator.cs
- BinaryUtilClasses.cs
- ContentType.cs
- CodeAssignStatement.cs
- SecureConversationVersion.cs
- ContextMenuAutomationPeer.cs
- ComNativeDescriptor.cs
- SqlProcedureAttribute.cs