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
- _NetRes.cs
- ObjectViewEntityCollectionData.cs
- SBCSCodePageEncoding.cs
- Validator.cs
- CornerRadius.cs
- ContractValidationHelper.cs
- FileClassifier.cs
- TransformFinalBlockRequest.cs
- NestedContainer.cs
- SchemaInfo.cs
- ObjectCloneHelper.cs
- XmlSchemaObjectTable.cs
- SqlCharStream.cs
- BreakRecordTable.cs
- SafeThreadHandle.cs
- Rijndael.cs
- DispatchChannelSink.cs
- Assert.cs
- SplashScreenNativeMethods.cs
- LocationSectionRecord.cs
- HitTestDrawingContextWalker.cs
- CanonicalFormWriter.cs
- DataGridViewSelectedRowCollection.cs
- Highlights.cs
- SmiEventSink_DeferedProcessing.cs
- SystemIcons.cs
- PropertyValueChangedEvent.cs
- ListViewItem.cs
- TextRange.cs
- FixedSOMPageElement.cs
- IPEndPointCollection.cs
- KoreanLunisolarCalendar.cs
- KeyGestureConverter.cs
- SqlInternalConnectionSmi.cs
- PriorityChain.cs
- HiddenFieldPageStatePersister.cs
- ExpressionVisitor.cs
- TypeSemantics.cs
- BitmapPalettes.cs
- ObjectComplexPropertyMapping.cs
- DesignerHost.cs
- UriParserTemplates.cs
- BaseCollection.cs
- SettingsContext.cs
- FacetDescription.cs
- cryptoapiTransform.cs
- MergeLocalizationDirectives.cs
- EventLogPermissionHolder.cs
- TimeZoneInfo.cs
- Function.cs
- XPathNavigator.cs
- TreeView.cs
- LogExtentCollection.cs
- ToolTipService.cs
- TableSectionStyle.cs
- ValidationHelper.cs
- PowerStatus.cs
- safePerfProviderHandle.cs
- CodeGenerator.cs
- TreeViewImageKeyConverter.cs
- DbDataReader.cs
- BinarySerializer.cs
- WebPartEventArgs.cs
- StylusDevice.cs
- SelectionProviderWrapper.cs
- SimpleType.cs
- HttpCapabilitiesEvaluator.cs
- VisualStyleTypesAndProperties.cs
- ListItemCollection.cs
- HebrewCalendar.cs
- RuleSettingsCollection.cs
- AccessorTable.cs
- IndexOutOfRangeException.cs
- PeerChannelFactory.cs
- Vector3DAnimationBase.cs
- CustomAttributeBuilder.cs
- IdleTimeoutMonitor.cs
- RelationshipFixer.cs
- CompilerTypeWithParams.cs
- SQLInt16.cs
- ToolStripDropDown.cs
- ObjectStateFormatter.cs
- SoapServerProtocol.cs
- CompensatableSequenceActivity.cs
- Control.cs
- SliderAutomationPeer.cs
- DataKeyArray.cs
- XmlIlTypeHelper.cs
- FilteredDataSetHelper.cs
- Variable.cs
- CapabilitiesState.cs
- CompositeClientFormatter.cs
- MappingSource.cs
- DataBindingCollection.cs
- smtppermission.cs
- XamlToRtfWriter.cs
- QueryStringParameter.cs
- AppearanceEditorPart.cs
- EntitySetRetriever.cs
- PanelContainerDesigner.cs