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
- OutputCacheSettingsSection.cs
- Wildcard.cs
- IntranetCredentialPolicy.cs
- WebPartDisplayModeCancelEventArgs.cs
- ProcessHostConfigUtils.cs
- Base64Encoder.cs
- Utils.cs
- HttpValueCollection.cs
- MsmqAppDomainProtocolHandler.cs
- SmiEventSink_DeferedProcessing.cs
- BrushValueSerializer.cs
- HtmlForm.cs
- PassportPrincipal.cs
- StringConverter.cs
- RenderDataDrawingContext.cs
- XamlTreeBuilder.cs
- RuleSettings.cs
- Missing.cs
- Stacktrace.cs
- BaseCAMarshaler.cs
- CodeCompiler.cs
- Graph.cs
- GridViewUpdatedEventArgs.cs
- PropertySourceInfo.cs
- GetPageCompletedEventArgs.cs
- AutomationEvent.cs
- ColorConvertedBitmapExtension.cs
- ObjectContext.cs
- HttpProfileBase.cs
- AssociationEndMember.cs
- TableLayoutPanel.cs
- StylusButton.cs
- GeometryGroup.cs
- ObjectDataSourceView.cs
- Oid.cs
- SmtpReplyReaderFactory.cs
- RegionData.cs
- MatrixCamera.cs
- HiddenField.cs
- CharacterMetricsDictionary.cs
- MachineKeyValidationConverter.cs
- ToolboxItemAttribute.cs
- RtfToXamlLexer.cs
- XamlTemplateSerializer.cs
- TextAnchor.cs
- ReflectionServiceProvider.cs
- RtfToXamlReader.cs
- KeyTime.cs
- HyperlinkAutomationPeer.cs
- TimeBoundedCache.cs
- BufferedStream.cs
- ListViewDeletedEventArgs.cs
- HttpResponse.cs
- DESCryptoServiceProvider.cs
- DateTimeSerializationSection.cs
- RadioButtonStandardAdapter.cs
- GridViewPageEventArgs.cs
- DataContractSerializer.cs
- DPAPIProtectedConfigurationProvider.cs
- ChangeTracker.cs
- EntityDataSourceContextDisposingEventArgs.cs
- ScrollEvent.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- GeneralTransform3D.cs
- SingleAnimationBase.cs
- TripleDESCryptoServiceProvider.cs
- StateRuntime.cs
- DetailsViewDeletedEventArgs.cs
- Int32RectValueSerializer.cs
- ExternalException.cs
- DocumentSequenceHighlightLayer.cs
- BinaryObjectReader.cs
- IBuiltInEvidence.cs
- SignatureDescription.cs
- ChtmlTextWriter.cs
- StringFreezingAttribute.cs
- _UriTypeConverter.cs
- PartBasedPackageProperties.cs
- TypefaceMetricsCache.cs
- InputGestureCollection.cs
- FieldDescriptor.cs
- PeerInputChannelListener.cs
- ScriptManager.cs
- DataGridViewColumnCollectionEditor.cs
- DataBoundControlHelper.cs
- FilteredReadOnlyMetadataCollection.cs
- StylusButton.cs
- SettingsContext.cs
- OpenCollectionAsyncResult.cs
- GenericEnumConverter.cs
- Animatable.cs
- AssemblyName.cs
- SQLDoubleStorage.cs
- TreeIterators.cs
- OracleColumn.cs
- SqlCharStream.cs
- BaseDataList.cs
- EmbeddedMailObjectsCollection.cs
- WsdlInspector.cs
- TextModifier.cs