Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / System / Windows / Input / TouchPoint.cs / 1305600 / TouchPoint.cs
//---------------------------------------------------------------------------- // // Copyright (C) Microsoft Corporation. All rights reserved. // //--------------------------------------------------------------------------- using System; using System.Windows; using System.Windows.Input; namespace System.Windows.Input { ////// Describes a particular position and bounds of a TouchDevice. /// public class TouchPoint : IEquatable{ /// /// Creates an instance of this class and initializes its properties. /// /// /// The TouchDevice that this TouchPoint describes. Must be non-null. /// /// /// The current location of the device. /// The coordinate space of this parameter is defined by the caller and should be /// consistent with the rectBounds parameter. /// /// /// The bounds of the area that the TouchDevice (i.e. finger) is in contact with the screen. /// The coordinate space of this parameter is defined by the caller and should be /// consistent with the position parameter. /// /// Indicates the last action that occured by this device at this location. /// public TouchPoint(TouchDevice device, Point position, Rect bounds, TouchAction action) { if (device == null) { throw new ArgumentNullException("device"); } TouchDevice = device; Position = position; Bounds = bounds; Action = action; } ////// The device associated with this TouchPoint. /// public TouchDevice TouchDevice { get; private set; } ////// The position of this device. The coordinate space is defined /// by the provider of this object. /// public Point Position { get; private set; } ////// The bounds of the area that the finger is in contact with /// the screen. The coordinate space is defined by the /// provider of this object. /// public Rect Bounds { get; private set; } ////// Equivalent to Bounds.Size. /// public Size Size { get { return Bounds.Size; } } ////// The last action associated with this device. /// public TouchAction Action { get; private set; } #region IEquatable ////// Whether two TouchPoints are equivalent. /// /// Another TouchPoint. ///true if this TouchPoint and the other TouchPoint are equivalent. bool IEquatable.Equals(TouchPoint other) { if (other != null) { return (other.TouchDevice == TouchDevice) && (other.Position == Position) && (other.Bounds == Bounds) && (other.Action == Action); } return false; } #endregion } } // 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
- MetafileHeaderWmf.cs
- WmlValidationSummaryAdapter.cs
- DataGridViewLinkCell.cs
- AssemblyContextControlItem.cs
- RowVisual.cs
- XmlDataImplementation.cs
- FunctionImportMapping.ReturnTypeRenameMapping.cs
- IndexedString.cs
- RuntimeHandles.cs
- Compiler.cs
- GenericEnumConverter.cs
- XmlDataProvider.cs
- RowBinding.cs
- PresentationTraceSources.cs
- SafeCryptContextHandle.cs
- UserControlAutomationPeer.cs
- WebSysDisplayNameAttribute.cs
- DependsOnAttribute.cs
- WindowPatternIdentifiers.cs
- TreeViewDataItemAutomationPeer.cs
- DataSvcMapFileSerializer.cs
- TextShapeableCharacters.cs
- PropertyValidationContext.cs
- SqlWebEventProvider.cs
- OracleConnectionStringBuilder.cs
- RichTextBoxConstants.cs
- GridProviderWrapper.cs
- UrlPath.cs
- PersistenceTypeAttribute.cs
- _CookieModule.cs
- ListDictionaryInternal.cs
- EdmComplexTypeAttribute.cs
- FileDetails.cs
- IPAddress.cs
- _OSSOCK.cs
- MenuAutoFormat.cs
- DllNotFoundException.cs
- TextLine.cs
- CustomExpressionEventArgs.cs
- documentsequencetextcontainer.cs
- DateTime.cs
- TextServicesPropertyRanges.cs
- DrawingState.cs
- Span.cs
- DataGridColumnCollection.cs
- ControlIdConverter.cs
- FormViewUpdatedEventArgs.cs
- DataControlFieldCell.cs
- WebReferencesBuildProvider.cs
- QuaternionAnimation.cs
- SingleBodyParameterMessageFormatter.cs
- DrawingContextWalker.cs
- AnnotationAdorner.cs
- Calendar.cs
- SplineQuaternionKeyFrame.cs
- TaskExtensions.cs
- AssemblyBuilderData.cs
- MimeWriter.cs
- IgnoreSection.cs
- MenuBindingsEditor.cs
- ToolStripDropDownClosedEventArgs.cs
- CmsInterop.cs
- SwitchLevelAttribute.cs
- TreeViewHitTestInfo.cs
- XmlElementAttributes.cs
- FontFamily.cs
- GridViewEditEventArgs.cs
- ScrollViewer.cs
- OdbcTransaction.cs
- ButtonBase.cs
- ToolStripDropDownDesigner.cs
- WindowsRichEdit.cs
- SpStreamWrapper.cs
- OleDbPermission.cs
- DataGridViewSortCompareEventArgs.cs
- DecoderReplacementFallback.cs
- UserControlParser.cs
- AdornerDecorator.cs
- SQLStringStorage.cs
- RichTextBoxConstants.cs
- HScrollProperties.cs
- TypedTableHandler.cs
- SocketConnection.cs
- WorkflowCompensationBehavior.cs
- SystemIPInterfaceProperties.cs
- QueryResult.cs
- AssociationSetEnd.cs
- WebPartExportVerb.cs
- DocumentGridContextMenu.cs
- ListenerAdapter.cs
- Condition.cs
- KeyConverter.cs
- LiteralControl.cs
- SafeNativeMethods.cs
- ColumnMapVisitor.cs
- ObjectQuery.cs
- cryptoapiTransform.cs
- DeferrableContentConverter.cs
- CryptographicAttribute.cs
- TextEffect.cs