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
- JavascriptCallbackResponseProperty.cs
- ActivityExecutor.cs
- sqlmetadatafactory.cs
- ProcessModuleCollection.cs
- DataSvcMapFileSerializer.cs
- DiffuseMaterial.cs
- XmlSchemaInferenceException.cs
- EventLogEntry.cs
- nulltextcontainer.cs
- XmlSchemaExporter.cs
- NameValueFileSectionHandler.cs
- GACMembershipCondition.cs
- CookielessHelper.cs
- CompatibleIComparer.cs
- ControlBuilder.cs
- DBSqlParserColumn.cs
- DataObjectAttribute.cs
- ProcessHostConfigUtils.cs
- ReverseComparer.cs
- HtmlTernaryTree.cs
- _ConnectStream.cs
- OdbcError.cs
- GuidConverter.cs
- XhtmlTextWriter.cs
- WindowsFormsHelpers.cs
- PublisherMembershipCondition.cs
- Base64Stream.cs
- MetaChildrenColumn.cs
- StreamReader.cs
- DataGridHyperlinkColumn.cs
- Shared.cs
- IERequestCache.cs
- XmlKeywords.cs
- NamespaceCollection.cs
- XmlILStorageConverter.cs
- ProtectedConfiguration.cs
- GeneralTransform2DTo3D.cs
- Gdiplus.cs
- ProtocolViolationException.cs
- RtType.cs
- ProtocolException.cs
- CatalogPartCollection.cs
- ExpressionPrefixAttribute.cs
- DispatchWrapper.cs
- Proxy.cs
- XmlSchemaParticle.cs
- ObjectDesignerDataSourceView.cs
- DataGridViewAccessibleObject.cs
- ParserStreamGeometryContext.cs
- ScrollViewerAutomationPeer.cs
- RenderCapability.cs
- CompilationSection.cs
- Merger.cs
- DataKey.cs
- SafeProcessHandle.cs
- SoapExtensionTypeElementCollection.cs
- KeyValueInternalCollection.cs
- OracleDataAdapter.cs
- WCFModelStrings.Designer.cs
- WhiteSpaceTrimStringConverter.cs
- CriticalHandle.cs
- webproxy.cs
- MemberDescriptor.cs
- ListBox.cs
- SqlDataSourceFilteringEventArgs.cs
- ProcessingInstructionAction.cs
- CompModSwitches.cs
- StaticContext.cs
- ProfileEventArgs.cs
- ToolBarTray.cs
- FamilyMapCollection.cs
- SimpleBitVector32.cs
- Item.cs
- ObjectDesignerDataSourceView.cs
- ResolveNameEventArgs.cs
- XslCompiledTransform.cs
- ProjectionPathSegment.cs
- PeerOutputChannel.cs
- RegexGroup.cs
- Win32MouseDevice.cs
- ObjectViewEntityCollectionData.cs
- HybridDictionary.cs
- MenuScrollingVisibilityConverter.cs
- Knowncolors.cs
- SimpleType.cs
- EventToken.cs
- TagNameToTypeMapper.cs
- WebPartConnectVerb.cs
- LabelLiteral.cs
- WsdlImporterElementCollection.cs
- DataGridViewImageCell.cs
- AppSettingsReader.cs
- EventLogPermissionEntryCollection.cs
- ErrorItem.cs
- CacheChildrenQuery.cs
- ToolStripControlHost.cs
- EntityException.cs
- Crc32.cs
- DataGridrowEditEndingEventArgs.cs
- MultiAsyncResult.cs