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
- EntityAdapter.cs
- SpecularMaterial.cs
- RootBrowserWindow.cs
- ServiceCredentials.cs
- DecoderExceptionFallback.cs
- GridProviderWrapper.cs
- Font.cs
- AssemblyCollection.cs
- Control.cs
- Int16Storage.cs
- OracleMonthSpan.cs
- Queue.cs
- _ListenerAsyncResult.cs
- RichTextBoxAutomationPeer.cs
- FrameworkPropertyMetadata.cs
- ApplicationSettingsBase.cs
- ValidationPropertyAttribute.cs
- ModelVisual3D.cs
- OciHandle.cs
- ContainerSelectorGlyph.cs
- XmlIlTypeHelper.cs
- WorkItem.cs
- DataRecordInfo.cs
- PlatformNotSupportedException.cs
- HtmlImage.cs
- ControlAdapter.cs
- MailDefinition.cs
- XslAstAnalyzer.cs
- KeyEvent.cs
- OSFeature.cs
- FrameworkContextData.cs
- Vector3DValueSerializer.cs
- TextServicesDisplayAttributePropertyRanges.cs
- AsyncWaitHandle.cs
- FormsAuthenticationUserCollection.cs
- MarkupProperty.cs
- ChangePassword.cs
- DeadLetterQueue.cs
- ListViewGroupConverter.cs
- DataRelationPropertyDescriptor.cs
- ErrorBehavior.cs
- uribuilder.cs
- DynamicValueConverter.cs
- ExternalFile.cs
- HtmlWindow.cs
- DecoderNLS.cs
- WindowsIPAddress.cs
- DataGridTable.cs
- HMACSHA512.cs
- recordstatefactory.cs
- ComponentCollection.cs
- StateDesignerConnector.cs
- ExceptionUtil.cs
- TimerExtension.cs
- EmptyStringExpandableObjectConverter.cs
- ValidationSummary.cs
- TextModifier.cs
- EnumValAlphaComparer.cs
- WarningException.cs
- safesecurityhelperavalon.cs
- InputProcessorProfiles.cs
- ResponseBodyWriter.cs
- EntityConnectionStringBuilder.cs
- FileController.cs
- _KerberosClient.cs
- DesignTable.cs
- TextStore.cs
- CodePrimitiveExpression.cs
- StorageConditionPropertyMapping.cs
- OleServicesContext.cs
- ScriptControlDescriptor.cs
- XmlSchemaAnnotation.cs
- Preprocessor.cs
- IdentityValidationException.cs
- ApplicationDirectoryMembershipCondition.cs
- MessageUtil.cs
- FileDialogCustomPlace.cs
- SID.cs
- CallbackValidatorAttribute.cs
- ExecutionContext.cs
- Console.cs
- IndentTextWriter.cs
- PrintPreviewDialog.cs
- ValidationHelper.cs
- VirtualizingPanel.cs
- DbDataAdapter.cs
- ServiceAuthorizationElement.cs
- PseudoWebRequest.cs
- InputEventArgs.cs
- EncodedStreamFactory.cs
- AuthenticationSection.cs
- BrowserCapabilitiesFactoryBase.cs
- BindableTemplateBuilder.cs
- HandleValueEditor.cs
- EdgeModeValidation.cs
- MetadataWorkspace.cs
- WindowsStartMenu.cs
- Privilege.cs
- _NegoStream.cs
- ServiceMetadataPublishingElement.cs