Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]
Performs gesture recognition on the pointer input fed to it, with the output returned in units relative to the device, rather than the display-independent pixels returned by GestureRecognizer. These output units are better suited for touchpad input so that gestures can be recognized relative to the touchpad itself rather than to the display.
Once pointer input is fed to the recognizer, it becomes active. It stays active until the input interaction is complete — either by feeding departing input for all contacts or by forcibly completing it via CompleteGesture().
All APIs function identically to their counterparts in GestureRecognizer. The only difference is the coordinate space of the recognized output exposed via the gesture events.
Namespace: Windows.UI.Input
Members
Constructor
PhysicalGestureRecognizer();
Returns a new instance of the PhysicalGestureRecognizer runtimeclass.
Properties
IsActive
Boolean IsActive { get; }
Returns whether an input interaction is still being processed.
GestureSettings
Windows.UI.Input.GestureSettings GestureSettings;
Gets or sets the gestures that are configured for recognition. The PhysicalGestureRecognizer supports the following subset of gestures:
- Tap
- Hold
- ManipulationTranslate[Rails][X,Y]
- ManipulationRotate
- ManipulationScale
- ManipulationMultipleFingerPanning
Touchpad input will never be recognized as Tap or Hold, since touchpad input is only received in scenarios where those gestures are no longer possible to perform.
TapMinContactCount
UInt32 TapMinContactCount;
Gets or sets the minimum number of contacts required for a tap to be recognized.
TapMaxContactCount
UInt32 TapMaxContactCount;
Gets or sets the maximum number of contacts required for a tap to be recognized.
HoldMinContactCount
UInt32 HoldMinContactCount;
Gets or sets the minimum number of contacts required for a hold to be recognized.
HoldMaxContactCount
UInt32 HoldMaxContactCount;
Gets or sets the maximum number of contacts required for a hold to be recognized.
HoldRadius
Single HoldRadius;
Gets or sets the radius within which a contact must stay from its original down location for a tap or hold to be recognized.
HoldStartDelay
Windows.Foundation.TimeSpan HoldStartDelay;
Gets or sets the amount of time a contact must stay down before a hold is recognized. If the contact's duration is less than this value when it departs, and it has not traveled further than the HoldRadius, then a tap is recognized.
TranslationMinContactCount
UInt32 TranslationMinContactCount;
Gets or sets the minimum number of contacts required for a translation to be recognized.
TranslationMaxContactCount
UInt32 TranslationMaxContactCount;
Gets or sets the maximum number of contacts required for a translation to be recognized.
Methods
ProcessDownEvent, ProcessMoveEvents, ProcessUpEvent
void ProcessDownEvent(Windows.UI.Input.PointerPoint value);
void ProcessMoveEvents(IVector<Windows.UI.Input.PointerPoint> value);
void ProcessUpEvent(Windows.UI.Input.PointerPoint value);
Feeds the specified pointer input to the PhysicalGestureRecognizer for gesture recognition.
CompleteGesture
void CompleteGesture();
Completes the current interaction so that subsequent input is treated as a new gesture. If a gesture is currently in progress, events for its completion will be triggered.
Events
ManipulationStarted
event Windows.Foundation.TypedEventHandler<
PhysicalGestureRecognizer,
Windows.UI.Input.ManipulationStartedEventArgs> ManipulationStarted;
Triggered when the PhysicalGestureRecognizer begins recognizing a manipulation.
ManipulationUpdated
event Windows.Foundation.TypedEventHandler<
PhysicalGestureRecognizer,
Windows.UI.Input.ManipulationUpdatedEventArgs> ManipulationUpdated;
Triggered when the PhysicalGestureRecognizer receives updated input during a manipulation.
ManipulationCompleted
event Windows.Foundation.TypedEventHandler<
PhysicalGestureRecognizer,
Windows.UI.Input.ManipulationCompletedEventArgs> ManipulationCompleted;
Triggered when the PhysicalGestureRecognizer finishes recognizing a manipulation.
Tapped
event Windows.Foundation.TypedEventHandler<
PhysicalGestureRecognizer,
Windows.UI.Input.TappedEventArgs> Tapped;
Triggered when the PhysicalGestureRecognizer recognizes a tap.
Holding
event Windows.Foundation.TypedEventHandler<
PhysicalGestureRecognizer,
Windows.UI.Input.HoldingEventArgs> Holding;
Triggered when the PhysicalGestureRecognizer recognizes a hold gesture.
Requirements
| Requirement | Value |
|---|---|
| Minimum supported client | Windows 11 |
| Namespace | Windows.UI.Input |
| API contract | Windows.Foundation.UniversalApiContract (version 19) |
| IID | IPhysicalGestureRecognizer: 79a29f4d-32a6-5aa5-a999-42b0b420c66d |