Code:
/ 4.0 / 4.0 / 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. //---------------------------------------------------------------------------- // // 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
- MILUtilities.cs
- SQLMoney.cs
- XmlEncodedRawTextWriter.cs
- DataProtection.cs
- TableSectionStyle.cs
- MailSettingsSection.cs
- MissingMemberException.cs
- DesigntimeLicenseContext.cs
- VectorCollectionValueSerializer.cs
- FirewallWrapper.cs
- SafePEFileHandle.cs
- OleDbCommand.cs
- ForwardPositionQuery.cs
- DbConnectionHelper.cs
- UpdateCommand.cs
- MenuAutomationPeer.cs
- TextReader.cs
- Int32Rect.cs
- Int32Collection.cs
- UnsafeNativeMethods.cs
- BamlResourceDeserializer.cs
- XmlSignificantWhitespace.cs
- LoginUtil.cs
- ReadOnlyDictionary.cs
- CompensationHandlingFilter.cs
- CategoryNameCollection.cs
- TemplateField.cs
- RtfToXamlReader.cs
- BitmapEffect.cs
- MeasurementDCInfo.cs
- ProfilePropertySettings.cs
- TextPenaltyModule.cs
- RowToFieldTransformer.cs
- safex509handles.cs
- Queue.cs
- XmlWellformedWriter.cs
- PlaceHolder.cs
- HtmlInputSubmit.cs
- Thickness.cs
- VisualStyleRenderer.cs
- MsmqUri.cs
- QueryCacheEntry.cs
- dataprotectionpermission.cs
- StyleXamlTreeBuilder.cs
- PropertyGeneratedEventArgs.cs
- ListBindingHelper.cs
- IdentityModelDictionary.cs
- Switch.cs
- OdbcReferenceCollection.cs
- ChangeProcessor.cs
- EncodingFallbackAwareXmlTextWriter.cs
- Panel.cs
- MiniModule.cs
- CharacterMetrics.cs
- QueryOutputWriter.cs
- HwndProxyElementProvider.cs
- latinshape.cs
- JsonDeserializer.cs
- ElementProxy.cs
- ProxyElement.cs
- UnsafeNativeMethods.cs
- OrderByBuilder.cs
- ArrayHelper.cs
- GPPOINTF.cs
- ResourceFallbackManager.cs
- Overlapped.cs
- Divide.cs
- WMIGenerator.cs
- DigitShape.cs
- ReadWriteObjectLock.cs
- IteratorFilter.cs
- FontUnit.cs
- TextBoxLine.cs
- DataGridViewColumnEventArgs.cs
- RichTextBoxAutomationPeer.cs
- OperatorExpressions.cs
- TextRunProperties.cs
- ImageCodecInfoPrivate.cs
- NestPullup.cs
- EntityViewContainer.cs
- CorrelationExtension.cs
- SortedDictionary.cs
- SqlMetaData.cs
- dbdatarecord.cs
- MediaScriptCommandRoutedEventArgs.cs
- SynchronizedInputProviderWrapper.cs
- TypeGeneratedEventArgs.cs
- PropagatorResult.cs
- Button.cs
- Point4DValueSerializer.cs
- WizardSideBarListControlItemEventArgs.cs
- DynamicRendererThreadManager.cs
- ParsedAttributeCollection.cs
- RelationshipConstraintValidator.cs
- SpeakInfo.cs
- PropertyDescriptorGridEntry.cs
- SetStateDesigner.cs
- COM2IProvidePropertyBuilderHandler.cs
- ChameleonKey.cs
- WebPartZoneBase.cs