CrossSlidingState Enum
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Specifies the possible states of the CrossSliding event.
public enum class CrossSlidingState
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Foundation.WindowsAppSDKContract, 65536)]
enum class CrossSlidingState
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Foundation.WindowsAppSDKContract), 65536)]
public enum CrossSlidingState
var value = Microsoft.UI.Input.CrossSlidingState.started
Public Enum CrossSlidingState
- Inheritance
-
CrossSlidingState
- Attributes
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. 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.
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.