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
- SimplePropertyEntry.cs
- securitymgrsite.cs
- DataBindingCollection.cs
- XsltSettings.cs
- TagMapCollection.cs
- NavigatingCancelEventArgs.cs
- BaseTemplateParser.cs
- Version.cs
- LoginCancelEventArgs.cs
- WeakReadOnlyCollection.cs
- SoapSchemaImporter.cs
- SegmentInfo.cs
- HandlerFactoryWrapper.cs
- TextRangeEditLists.cs
- EntityDataSourceState.cs
- SiblingIterators.cs
- OrderedParallelQuery.cs
- XsltInput.cs
- OrderByBuilder.cs
- ObjectParameterCollection.cs
- EntityProxyTypeInfo.cs
- TextChange.cs
- MiniAssembly.cs
- TraceContextEventArgs.cs
- ErrorsHelper.cs
- IndentedTextWriter.cs
- PackageDigitalSignatureManager.cs
- TextStore.cs
- QualifiedCellIdBoolean.cs
- Transactions.cs
- TextContainerChangeEventArgs.cs
- TabItemAutomationPeer.cs
- ResXResourceReader.cs
- XPathAncestorIterator.cs
- DetailsViewRowCollection.cs
- FamilyTypefaceCollection.cs
- EvidenceTypeDescriptor.cs
- FontWeightConverter.cs
- WSTrustDec2005.cs
- Nullable.cs
- ConfigXmlElement.cs
- SyndicationSerializer.cs
- DescendantBaseQuery.cs
- CheckableControlBaseAdapter.cs
- KoreanCalendar.cs
- MarkupCompilePass2.cs
- NativeMsmqMessage.cs
- RuntimeVariableList.cs
- DefaultEventAttribute.cs
- IListConverters.cs
- TableLayout.cs
- IndexedEnumerable.cs
- SocketPermission.cs
- ParserOptions.cs
- SerialPinChanges.cs
- ParserOptions.cs
- Size3D.cs
- ToggleProviderWrapper.cs
- X509KeyIdentifierClauseType.cs
- TitleStyle.cs
- PropertyNames.cs
- BaseAsyncResult.cs
- PointHitTestResult.cs
- WebBrowserPermission.cs
- DesignBindingConverter.cs
- HttpModuleActionCollection.cs
- DisplayInformation.cs
- DocComment.cs
- NamespaceQuery.cs
- FontDriver.cs
- BrowserCapabilitiesFactory.cs
- Light.cs
- StyleSheetRefUrlEditor.cs
- ConditionedDesigner.cs
- mactripleDES.cs
- LoadRetryConstantStrategy.cs
- EdmProviderManifest.cs
- ResourceSetExpression.cs
- EntityCommand.cs
- PopupControlService.cs
- AbstractExpressions.cs
- Int16Storage.cs
- EdmFunction.cs
- CodeDirectoryCompiler.cs
- Function.cs
- HtmlEmptyTagControlBuilder.cs
- FixedTextContainer.cs
- StrokeNodeData.cs
- ResourceSet.cs
- sqlstateclientmanager.cs
- ProviderIncompatibleException.cs
- ComponentDesigner.cs
- TargetConverter.cs
- NativeMethods.cs
- EndpointDispatcherTable.cs
- PolicyImporterElementCollection.cs
- DbReferenceCollection.cs
- SystemWebExtensionsSectionGroup.cs
- ModelVisual3D.cs
- OperationAbortedException.cs