Skip to content

Add SwipeGestureRecognizer docs#934

Open
jsuarezruiz wants to merge 2 commits intomainfrom
swipegesturerecognizer-docs
Open

Add SwipeGestureRecognizer docs#934
jsuarezruiz wants to merge 2 commits intomainfrom
swipegesturerecognizer-docs

Conversation

@jsuarezruiz
Copy link
Copy Markdown
Member

New documentation for the SwipeGestureRecognizer covering properties (CanHorizontallySwipe, CanVerticallySwipe, Threshold, IsMouseEnabled), SwipeDirection enum, SwipeGestureEventArgs/SwipeGestureEndedEventArgs, and usage examples.

Copy link
Copy Markdown
Contributor

@luke-whos-here luke-whos-here left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of minor comments on the doc itself. Some of the paths where the docs are stored are from an unused earlier version and are now redirected - sorry if it's confusing!

});
```

The SwipeGestureRecognizer raises a `InputElement.SwipeGestureEvent` during the swipe as the pointer moves. When the swipe ends, from the pointer being released or another gesture start, it raises a `InputElement.SwipeGestureEndedEvent`.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The SwipeGestureRecognizer raises a `InputElement.SwipeGestureEvent` during the swipe as the pointer moves. When the swipe ends, from the pointer being released or another gesture start, it raises a `InputElement.SwipeGestureEndedEvent`.
The SwipeGestureRecognizer raises an `InputElement.SwipeGestureEvent` during the swipe as the pointer moves. When the swipe ends, from the pointer being released or another gesture starting, it raises an `InputElement.SwipeGestureEndedEvent`.

The SwipeGestureRecognizer raises a `InputElement.SwipeGestureEvent` during the swipe as the pointer moves. When the swipe ends, from the pointer being released or another gesture start, it raises a `InputElement.SwipeGestureEndedEvent`.

## Binding events
After the SwipeGestureRecognizer has been added to your control, you need to bind them in your code behind either through an inline handler or to an event function:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
After the SwipeGestureRecognizer has been added to your control, you need to bind them in your code behind either through an inline handler or to an event function:
After the `SwipeGestureRecognizer `has been added to your control, you need to bind them in your code-behind either through an inline handler or to an event function:


You will probably use these properties most often:

| Property | Description |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend adding a third column for defaults.

Comment on lines +122 to +133
## More information

:::info
For the complete API documentation about this gesture recognizer, see the [SwipeGestureRecognizer API reference](/api/avalonia/input/gesturerecognizers/swipegesturerecognizer).
:::

:::info
View the source code on _GitHub_ [`SwipeGestureRecognizer.cs`](https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Base/Input/GestureRecognizers/SwipeGestureRecognizer.cs)
:::

## See also

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
## More information
:::info
For the complete API documentation about this gesture recognizer, see the [SwipeGestureRecognizer API reference](/api/avalonia/input/gesturerecognizers/swipegesturerecognizer).
:::
:::info
View the source code on _GitHub_ [`SwipeGestureRecognizer.cs`](https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Base/Input/GestureRecognizers/SwipeGestureRecognizer.cs)
:::
## See also
## See also
- [API reference](/api/avalonia/input/gesturerecognizers/swipegesturerecognizer).
- [Source code](https://github.com/AvaloniaUI/Avalonia/blob/master/src/Avalonia.Base/Input/GestureRecognizers/SwipeGestureRecognizer.cs)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the reference/gestures path is a leftover from an earlier draft of the v12 docs restructure. We are now redirecting all docs in this path to docs/input-interaction/gestures. We'll be fine with just a single copy of the doc in that directory.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doc now redirects to docs/input-interaction/gestures as of the released version of the v12 docs. We really should retire duplicate invisible pages like this one, to avoid creating confusing situations such as this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants