Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/chaosifier/MultiGestureView
A container View for Xamarin.Forms that supports event binding for gestures like Long Press, Tap and Right Click.
https://github.com/chaosifier/MultiGestureView
Last synced: 29 days ago
JSON representation
A container View for Xamarin.Forms that supports event binding for gestures like Long Press, Tap and Right Click.
- Host: GitHub
- URL: https://github.com/chaosifier/MultiGestureView
- Owner: chaosifier
- License: mit
- Created: 2018-07-15T15:11:56.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-17T08:00:46.000Z (over 1 year ago)
- Last Synced: 2024-05-13T00:35:21.810Z (7 months ago)
- Language: C#
- Size: 293 KB
- Stars: 22
- Watchers: 4
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-xamarin-forms - MultiGestureView ★23
README
# MultiGestureView
Extended ContentView with Events for gestures like Tap, Long Press and Right Click. Also supports Vibration and Vibration duration for haptic feedback.#### Setup :
* Available on NuGet: https://www.nuget.org/packages/Xam.Plugin.MultiGestureView/ [![NuGet](https://img.shields.io/badge/NuGet-1.0.5-brightgreen.svg)](https://www.nuget.org/packages/Xam.Plugin.MultiGestureView/)
* Install in your PCL/.Net Standard 2.0 and client projects.* Call Init() method of custom renderers in each platform.
```
MultiGestureViewRenderer.Init();
```The library needs Vibration permission in Android for vibration to work. The permission should automatically be added if installed from NuGet. If the vibration still doesn't work, try adding the Vibration permission explicitly.
#### Gesture Support :
|Platform|Long Press|Tap|Right Click|
| ------------------- | :-----------: | :-----------: | :------------------: |
|Xamarin.iOS Unified|Yes|Yes|No|
|Xamarin.Android|Yes|Yes|No|
|UWP|No|Yes|Yes|#### Basic Usage :
* Code behind
```
var gestureView = new MultiGestureView()
{
VibrateOnTap = true,
TapVibrationDuration = 150,
VibrateOnLongPress = true,
LongPressVibrationDuration = 300,
HeightRequest = 300,
WidthRequest = 300,
BackgroundColor = Color.Salmon,
HorizontalOptions = LayoutOptions.Center,
VerticalOptions = LayoutOptions.Center,
Content = new Label() { Text = "Hello World!", HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Center }
};gestureView.Tapped += (s, e) =>
{
DisplayAlert("Tapped", "Tap gesture detected.", "Ok");
};gestureView.LongPressed += (s, e) =>
{
DisplayAlert("Long Pressed", "Long press gesture detected.", "Ok");
};gestureView.RightClicked += (s, e) =>
{
DisplayAlert("Right Click", "Right click detected.", "Ok");
};
```* XAML
```
```