Dela via


CrossSlidingState Enum

Definition

Specifies the possible states of the CrossSliding event.

public enum class CrossSlidingState
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
enum class CrossSlidingState
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
public enum CrossSlidingState
var value = Windows.UI.Input.CrossSlidingState.started
Public Enum CrossSlidingState
Inheritance
CrossSlidingState
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Fields

Name Value Description
Started 0

A CrossSliding interaction has been detected.

Dragging 1

A CrossSliding interaction has started but the swipe or slide gesture has not crossed the minimum distance threshold for a selection action. (See the Remarks section for a diagram showing the CrossSliding distance thresholds.)

Note

There is no correlation between Dragging in CrossSlidingState (touch) and DraggingState (mouse or pen/stylus).

Selecting 2

The swipe or slide gesture has crossed the minimum distance threshold for a selection action but has not crossed the minimum distance threshold of the rearrange action. This state is valid only when SpeedBumpStart is disabled in a GestureRecognizer.

SelectSpeedBumping 3

The swipe or slide gesture has crossed the minimum distance threshold for a selection action (and the selection speed bump) but has not crossed the maximum distance threshold of the selection speed bump. This state is valid only when both SpeedBumpStart and SelectionStart are enabled in a GestureRecognizer.

SpeedBumping 4

The swipe or slide gesture has crossed the minimum distance threshold for a selection action (and the selection speed bump) but has not crossed the maximum distance threshold of the selection speed bump. This state is valid only when SpeedBumpStart is enabled and SelectionStart is disabled in a GestureRecognizer.

Rearranging 5

The swipe or slide gesture has crossed the minimum distance threshold of the rearrange action. This state is valid only when RearrangeStart is enabled in a GestureRecognizer.

Completed 6

The swipe or slide gesture has stopped, the CrossSliding interaction has been completed, and the touch contact lifted.

Remarks

The CrossSlidingState property is set based on the distance thresholds specified by the CrossSlideThresholds property of a GestureRecognizer.

These distance thresholds are used to determine whether the CrossSliding interaction results in a select action or a rearrange action. The following diagram shows the CrossSliding regions and thresholds. The areas highlighted in blue are the selection/speed bump regions. (The region on the left shows the distance the tile must travel while the region on the right shows the equivalent distance that the touch contact must travel due to the speed bump behavior).

Note

A speed bump is a CrossSliding region in which the user experiences a slight drag (or friction) during the swipe or slide gesture.

Screen shot showing CrossSlide regions and distance thresholds.

Selection, rearrange, and speed-bumps can be enabled or disabled in any combination through the CrossSlideThresholds property of a GestureRecognizer.

If SelectionStart and SpeedBumpStart are both enabled then SpeedBumpStart is ignored (friction is still experienced) and SelectSpeedBumping is returned when the swipe or slide gesture is detected within the selection/speed bumping region.

If SelectionStart is enabled and SpeedBumpStart is disabled then Selecting is returned when the swipe or slide gesture is detected within the selection/speed bump region.

If SpeedBumpStart and RearrangeStart are both enabled then SpeedBumpEnd is ignored and friction continues until the RearrangeStart threshold is reached.

If RearrangeStart is enabled then Rearranging is returned when the swipe or slide gesture is detected outside the selection/speed bumping region.

Applies to

See also