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
- Grammar.cs
- SymmetricAlgorithm.cs
- FileInfo.cs
- LookupNode.cs
- EtwTrace.cs
- Environment.cs
- IDataContractSurrogate.cs
- CancellationHandlerDesigner.cs
- FixedPageProcessor.cs
- DataGridViewAutoSizeColumnModeEventArgs.cs
- RenderOptions.cs
- HyperLinkColumn.cs
- RecognizedPhrase.cs
- NameValueConfigurationCollection.cs
- WindowsTitleBar.cs
- WindowsAltTab.cs
- CorrelationManager.cs
- ForceCopyBuildProvider.cs
- SmiEventSink.cs
- HtmlElementEventArgs.cs
- OutputCacheSettings.cs
- XmlUrlResolver.cs
- PresentationSource.cs
- SemaphoreFullException.cs
- StaticFileHandler.cs
- SMSvcHost.cs
- ObjectReaderCompiler.cs
- UTF8Encoding.cs
- EtwTrace.cs
- DataGridViewRowPostPaintEventArgs.cs
- PolyLineSegment.cs
- NamespaceQuery.cs
- Bold.cs
- MembershipAdapter.cs
- SharedStream.cs
- XmlSchemaAttribute.cs
- Line.cs
- XmlEncoding.cs
- ISCIIEncoding.cs
- WebPartTransformer.cs
- EntityDataReader.cs
- CapiNative.cs
- CodeAttributeArgument.cs
- EncoderFallback.cs
- sqlstateclientmanager.cs
- DataKey.cs
- Native.cs
- TextTreeRootTextBlock.cs
- XmlArrayAttribute.cs
- XmlILModule.cs
- RowUpdatedEventArgs.cs
- ImageListStreamer.cs
- OdbcConnectionHandle.cs
- Typography.cs
- DrawingContextWalker.cs
- MetadataSection.cs
- TabletDeviceInfo.cs
- Int32RectConverter.cs
- TempFiles.cs
- OdbcStatementHandle.cs
- WebPartCloseVerb.cs
- UserControlCodeDomTreeGenerator.cs
- WorkflowElementDialog.cs
- DataServiceQuery.cs
- _LoggingObject.cs
- DataBoundControlHelper.cs
- DesignerActionUI.cs
- HttpListener.cs
- CodeEntryPointMethod.cs
- TimeSpanConverter.cs
- peernodestatemanager.cs
- RsaSecurityKey.cs
- Currency.cs
- ActiveDesignSurfaceEvent.cs
- AppSettingsExpressionBuilder.cs
- Parsers.cs
- TransportationConfigurationTypeInstallComponent.cs
- SqlExpressionNullability.cs
- BrowserDefinition.cs
- _ProxyChain.cs
- BuilderPropertyEntry.cs
- XmlNodeList.cs
- GrowingArray.cs
- InfoCardRSAPKCS1KeyExchangeFormatter.cs
- StyleSelector.cs
- Win32Exception.cs
- TagNameToTypeMapper.cs
- WebPartExportVerb.cs
- Command.cs
- DrawingGroup.cs
- BulletChrome.cs
- Trace.cs
- Rect3D.cs
- ProfileSettingsCollection.cs
- MediaCommands.cs
- ProvidersHelper.cs
- NotificationContext.cs
- FieldBuilder.cs
- XmlLinkedNode.cs
- Int64KeyFrameCollection.cs