├── .gitignore
├── Gestures.sln
├── LICENSE
├── README.md
├── SolutionInfo.cs
├── StyleCop.json
├── StyleCop.ruleset
├── azure-pipelines.yml
├── samples
├── Gestures.Forms.Sample.Droid
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── Gestures.Forms.Sample.Droid.csproj
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ └── Resources
│ │ ├── AboutResources.txt
│ │ ├── drawable
│ │ └── xamarin_logo.png
│ │ ├── layout
│ │ ├── Tabbar.xml
│ │ └── Toolbar.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── icon.xml
│ │ └── icon_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-mdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xhdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xxhdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── icon.png
│ │ └── launcher_foreground.png
│ │ └── values
│ │ ├── colors.xml
│ │ └── styles.xml
├── Gestures.Forms.Sample.MacOS
│ ├── AppDelegate.cs
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── AppIcon-128.png
│ │ │ ├── AppIcon-128@2x.png
│ │ │ ├── AppIcon-16.png
│ │ │ ├── AppIcon-16@2x.png
│ │ │ ├── AppIcon-256.png
│ │ │ ├── AppIcon-256@2x.png
│ │ │ ├── AppIcon-32.png
│ │ │ ├── AppIcon-32@2x.png
│ │ │ ├── AppIcon-512.png
│ │ │ ├── AppIcon-512@2x.png
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Entitlements.plist
│ ├── Gestures.Forms.Sample.MacOS.csproj
│ ├── Info.plist
│ ├── Main.cs
│ ├── Main.storyboard
│ ├── ViewController.cs
│ └── ViewController.designer.cs
├── Gestures.Forms.Sample.UWP
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── LargeTile.scale-100.png
│ │ ├── LargeTile.scale-200.png
│ │ ├── LargeTile.scale-400.png
│ │ ├── SmallTile.scale-100.png
│ │ ├── SmallTile.scale-200.png
│ │ ├── SmallTile.scale-400.png
│ │ ├── SplashScreen.scale-100.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── SplashScreen.scale-400.png
│ │ ├── Square150x150Logo.scale-100.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square150x150Logo.scale-400.png
│ │ ├── Square44x44Logo.altform-unplated_targetsize-16.png
│ │ ├── Square44x44Logo.altform-unplated_targetsize-256.png
│ │ ├── Square44x44Logo.altform-unplated_targetsize-48.png
│ │ ├── Square44x44Logo.scale-100.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-400.png
│ │ ├── Square44x44Logo.targetsize-16.png
│ │ ├── Square44x44Logo.targetsize-256.png
│ │ ├── Square44x44Logo.targetsize-48.png
│ │ ├── StoreLogo.backup.png
│ │ ├── StoreLogo.scale-100.png
│ │ ├── StoreLogo.scale-200.png
│ │ ├── StoreLogo.scale-400.png
│ │ ├── Wide310x150Logo.scale-100.png
│ │ ├── Wide310x150Logo.scale-200.png
│ │ └── Wide310x150Logo.scale-400.png
│ ├── Gestures.Forms.Sample.UWP.csproj
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
│ ├── add.png
│ └── xamarin_logo.png
├── Gestures.Forms.Sample.WPF
│ ├── App.config
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Gestures.Forms.Sample.WPF.csproj
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
├── Gestures.Forms.Sample.iOS
│ ├── AppDelegate.cs
│ ├── Assets.xcassets
│ │ └── AppIcon.appiconset
│ │ │ ├── Contents.json
│ │ │ ├── Icon1024.png
│ │ │ ├── Icon120.png
│ │ │ ├── Icon152.png
│ │ │ ├── Icon167.png
│ │ │ ├── Icon180.png
│ │ │ ├── Icon20.png
│ │ │ ├── Icon29.png
│ │ │ ├── Icon40.png
│ │ │ ├── Icon58.png
│ │ │ ├── Icon60.png
│ │ │ ├── Icon76.png
│ │ │ ├── Icon80.png
│ │ │ └── Icon87.png
│ ├── Entitlements.plist
│ ├── Gestures.Forms.Sample.iOS.csproj
│ ├── Info.plist
│ ├── Main.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Resources
│ │ ├── Default-568h@2x.png
│ │ ├── Default-Portrait.png
│ │ ├── Default-Portrait@2x.png
│ │ ├── Default.png
│ │ ├── Default@2x.png
│ │ ├── LaunchScreen.storyboard
│ │ ├── tab_about.png
│ │ ├── tab_about@2x.png
│ │ ├── tab_about@3x.png
│ │ ├── tab_feed.png
│ │ ├── tab_feed@2x.png
│ │ ├── tab_feed@3x.png
│ │ ├── xamarin_logo.png
│ │ ├── xamarin_logo@2x.png
│ │ └── xamarin_logo@3x.png
├── Gestures.Forms.Sample
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── AssemblyInfo.cs
│ ├── Gestures.Forms.Sample.csproj
│ └── Views
│ │ ├── HoverSamplePage.xaml
│ │ ├── HoverSamplePage.xaml.cs
│ │ ├── KeySamplePage.xaml
│ │ ├── KeySamplePage.xaml.cs
│ │ ├── LongPressSamplePage.xaml
│ │ ├── LongPressSamplePage.xaml.cs
│ │ ├── MainPage.xaml
│ │ ├── MainPage.xaml.cs
│ │ ├── PanSamplePage.xaml
│ │ ├── PanSamplePage.xaml.cs
│ │ ├── PinchSamplePage.xaml
│ │ ├── PinchSamplePage.xaml.cs
│ │ ├── SandboxSamplePage.xaml
│ │ ├── SandboxSamplePage.xaml.cs
│ │ ├── SwipeSamplePage.xaml
│ │ ├── SwipeSamplePage.xaml.cs
│ │ ├── TapSamplePage.xaml
│ │ └── TapSamplePage.xaml.cs
├── Gestures.Sample.Droid
│ ├── Assets
│ │ └── AboutAssets.txt
│ ├── Gestures.Sample.Droid.csproj
│ ├── MainActivity.cs
│ ├── Properties
│ │ ├── AndroidManifest.xml
│ │ └── AssemblyInfo.cs
│ └── Resources
│ │ ├── AboutResources.txt
│ │ ├── drawable
│ │ ├── ic_dashboard_black_24dp.xml
│ │ ├── ic_home_black_24dp.xml
│ │ └── ic_notifications_black_24dp.xml
│ │ ├── layout
│ │ └── activity_main.xml
│ │ ├── menu
│ │ └── navigation.xml
│ │ ├── mipmap-anydpi-v26
│ │ ├── ic_launcher.xml
│ │ ├── ic_launcher_round.xml
│ │ ├── icon.xml
│ │ └── icon_round.xml
│ │ ├── mipmap-hdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-mdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ ├── mipmap-xxxhdpi
│ │ ├── ic_launcher.png
│ │ ├── ic_launcher_foreground.png
│ │ └── ic_launcher_round.png
│ │ └── values
│ │ ├── colors.xml
│ │ ├── dimens.xml
│ │ ├── ic_launcher_background.xml
│ │ ├── strings.xml
│ │ └── styles.xml
├── Gestures.Sample.MacOS
│ ├── AppDelegate.cs
│ ├── Assets.xcassets
│ │ ├── AppIcon.appiconset
│ │ │ ├── AppIcon-128.png
│ │ │ ├── AppIcon-128@2x.png
│ │ │ ├── AppIcon-16.png
│ │ │ ├── AppIcon-16@2x.png
│ │ │ ├── AppIcon-256.png
│ │ │ ├── AppIcon-256@2x.png
│ │ │ ├── AppIcon-32.png
│ │ │ ├── AppIcon-32@2x.png
│ │ │ ├── AppIcon-512.png
│ │ │ ├── AppIcon-512@2x.png
│ │ │ └── Contents.json
│ │ └── Contents.json
│ ├── Entitlements.plist
│ ├── Gestures.Sample.MacOS.csproj
│ ├── Info.plist
│ ├── Main.cs
│ ├── Main.storyboard
│ ├── ViewController.cs
│ └── ViewController.designer.cs
├── Gestures.Sample.UWP
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Assets
│ │ ├── LockScreenLogo.scale-200.png
│ │ ├── SplashScreen.scale-200.png
│ │ ├── Square150x150Logo.scale-200.png
│ │ ├── Square44x44Logo.scale-200.png
│ │ ├── Square44x44Logo.targetsize-24_altform-unplated.png
│ │ ├── StoreLogo.png
│ │ └── Wide310x150Logo.scale-200.png
│ ├── Gestures.Sample.UWP.csproj
│ ├── MainPage.xaml
│ ├── MainPage.xaml.cs
│ ├── Package.appxmanifest
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ └── Default.rd.xml
├── Gestures.Sample.WPF
│ ├── App.config
│ ├── App.xaml
│ ├── App.xaml.cs
│ ├── Gestures.Sample.WPF.csproj
│ ├── MainWindow.xaml
│ ├── MainWindow.xaml.cs
│ └── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
└── Gestures.Sample.iOS
│ ├── AppDelegate.cs
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon1024.png
│ │ ├── Icon120.png
│ │ ├── Icon152.png
│ │ ├── Icon167.png
│ │ ├── Icon180.png
│ │ ├── Icon20.png
│ │ ├── Icon29.png
│ │ ├── Icon40.png
│ │ ├── Icon58.png
│ │ ├── Icon60.png
│ │ ├── Icon76.png
│ │ ├── Icon80.png
│ │ └── Icon87.png
│ ├── First.imageset
│ │ ├── Contents.json
│ │ └── First.pdf
│ └── Second.imageset
│ │ ├── Contents.json
│ │ └── Second.pdf
│ ├── Entitlements.plist
│ ├── FirstViewController.cs
│ ├── FirstViewController.designer.cs
│ ├── Gestures.Sample.iOS.csproj
│ ├── Info.plist
│ ├── Main.cs
│ ├── Main.storyboard
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── Resources
│ └── LaunchScreen.xib
│ ├── SceneDelegate.cs
│ ├── SecondViewController.cs
│ └── SecondViewController.designer.cs
├── src
├── Gestures.Droid
│ ├── Gestures.Droid.csproj
│ ├── Recognizers
│ │ ├── HoverRecognizer.cs
│ │ ├── LongPressRecognizer.cs
│ │ ├── PanRecognizer.cs
│ │ ├── PinchRecognizer.cs
│ │ ├── SwipeRecognizer.cs
│ │ └── TapRecognizer.cs
│ └── Resources
│ │ ├── AboutResources.txt
│ │ └── values
│ │ └── strings.xml
├── Gestures.Forms.Droid
│ ├── Effects
│ │ └── RecognizerPlatformEffect.cs
│ ├── Gestures.Forms.Droid.csproj
│ ├── Platform.cs
│ └── Resources
│ │ ├── AboutResources.txt
│ │ └── values
│ │ └── strings.xml
├── Gestures.Forms.MacOS
│ ├── Effects
│ │ ├── ListenerPlatformEffect.cs
│ │ └── RecognizerPlatformEffect.cs
│ ├── Gestures.Forms.MacOS.csproj
│ └── Platform.cs
├── Gestures.Forms.UWP
│ ├── Effects
│ │ ├── ListenerPlatformEffect.cs
│ │ └── RecognizerPlatformEffect.cs
│ ├── Gestures.Forms.UWP.csproj
│ ├── Platform.cs
│ └── Properties
│ │ └── Gestures.Forms.UWP.rd.xml
├── Gestures.Forms.WPF
│ ├── Effects
│ │ ├── ListenerPlatformEffect.cs
│ │ └── RecognizerPlatformEffect.cs
│ ├── Gestures.Forms.WPF.csproj
│ ├── Platform.cs
│ ├── Properties
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ └── Themes
│ │ └── Generic.xaml
├── Gestures.Forms.iOS
│ ├── Effects
│ │ └── RecognizerPlatformEffect.cs
│ ├── Gestures.Forms.iOS.csproj
│ └── Platform.cs
├── Gestures.Forms
│ ├── Effects
│ │ ├── ListenerEffect.cs
│ │ └── RecognizerEffect.cs
│ ├── Events
│ │ ├── HoverEventArgs.cs
│ │ ├── KeyEventArgs.cs
│ │ ├── PanEventArgs.cs
│ │ ├── PinchEventArgs.cs
│ │ ├── SwipeEventArgs.cs
│ │ └── TapEventArgs.cs
│ ├── Extensions
│ │ ├── GestureListenerEx.cs
│ │ └── GestureRecognizerEx.cs
│ ├── Gestures.Forms.csproj
│ ├── Listeners
│ │ ├── GestureListener.cs
│ │ └── KeyGestureListener.cs
│ └── Recognizers
│ │ ├── GestureRecognizer.cs
│ │ ├── HoverGestureRecognizer.cs
│ │ ├── LongPressGestureRecognizer.cs
│ │ ├── PanGestureRecognizer.cs
│ │ ├── PinchGestureRecognizer.cs
│ │ ├── SwipeGestureRecognizer.cs
│ │ └── TapGestureRecognizer.cs
├── Gestures.MacOS
│ ├── Extensions
│ │ └── VirtualKeyEx.cs
│ ├── Gestures.MacOS.csproj
│ ├── Listeners
│ │ └── KeyListener.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Recognizers
│ │ ├── HoverRecognizer.cs
│ │ ├── LongPressRecognizer.cs
│ │ ├── PanRecognizer.cs
│ │ ├── PinchRecognizer.cs
│ │ ├── SwipeRecognizer.cs
│ │ └── TapRecognizer.cs
├── Gestures.UWP
│ ├── Extensions
│ │ └── VirtualKeyEx.cs
│ ├── Gestures.UWP.csproj
│ ├── Listeners
│ │ └── KeyListener.cs
│ ├── Properties
│ │ └── Gestures.UWP.rd.xml
│ └── Recognizers
│ │ ├── HoverRecognizer.cs
│ │ ├── LongPressRecognizer.cs
│ │ ├── PanRecognizer.cs
│ │ ├── PinchRecognizer.cs
│ │ ├── SwipeRecognizer.cs
│ │ └── TapRecognizer.cs
├── Gestures.WPF
│ ├── Extensions
│ │ └── VirtualKeyEx.cs
│ ├── Gestures.WPF.csproj
│ ├── Listeners
│ │ └── KeyListener.cs
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ ├── Resources.resx
│ │ ├── Settings.Designer.cs
│ │ └── Settings.settings
│ ├── Recognizers
│ │ ├── HoverRecognizer.cs
│ │ ├── LongPressRecognizer.cs
│ │ ├── PanRecognizer.cs
│ │ ├── PinchRecognizer.cs
│ │ ├── SwipeRecognizer.cs
│ │ └── TapRecognizer.cs
│ └── Themes
│ │ └── Generic.xaml
├── Gestures.iOS
│ ├── Extensions
│ │ └── UIKitEx.cs
│ ├── Gestures.iOS.csproj
│ └── Recognizers
│ │ ├── HoverRecognizer.cs
│ │ ├── LongPressRecognizer.cs
│ │ ├── PanRecognizer.cs
│ │ ├── PinchRecognizer.cs
│ │ ├── SwipeRecognizer.cs
│ │ └── TapRecognizer.cs
└── Gestures
│ ├── Defaults.cs
│ ├── Extensions
│ └── DisposableExtensions.cs
│ ├── Gestures.cs
│ ├── Gestures.csproj
│ ├── IViewAttachment.cs
│ ├── Listeners
│ ├── IKeyListener.cs
│ ├── IPlatformListener.cs
│ ├── PlatformKeyListener.cs
│ └── PlatformListener.cs
│ ├── Models
│ ├── GestureState.cs
│ ├── HoverEvent.cs
│ ├── Key.cs
│ ├── PanEvent.cs
│ ├── PinchEvent.cs
│ ├── Point.cs
│ └── SwipeDirection.cs
│ └── Recognizers
│ ├── IHoverRecognizer.cs
│ ├── ILongPressRecognizer.cs
│ ├── IPanRecognizer.cs
│ ├── IPinchRecognizer.cs
│ ├── IPlatformRecognizer.cs
│ ├── ISwipeRecognizer.cs
│ ├── ITapRecognizer.cs
│ ├── PlatformHoverRecognizer.cs
│ ├── PlatformLongPressRecognizer.cs
│ ├── PlatformPanRecognizer.cs
│ ├── PlatformPinchRecognizer.cs
│ ├── PlatformRecognizer.cs
│ ├── PlatformSwipeRecognizer.cs
│ └── PlatformTapRecognizer.cs
└── tests
└── Gestures.Tests
├── Gestures.Tests.csproj
├── Listeners
├── PlatformKeyListener_Tests.cs
└── PlatformListener_Tests.cs
└── Recognizers
├── PlatformHoverRecognizer_Tests.cs
├── PlatformLongPressRecognizer_Tests.cs
├── PlatformPanRecognizer_Tests.cs
├── PlatformPinchRecognizer_Tests.cs
├── PlatformRecognizer_Tests.cs
├── PlatformSwipeRecognizer_Tests.cs
└── PlatformTapRecognizer_Tests.cs
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2021 Matthew Richardson
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/SolutionInfo.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System.Reflection;
6 | using System.Runtime.CompilerServices;
7 |
8 | [assembly: AssemblyVersion("0.1.0")]
9 | [assembly: AssemblyCompany("Velocity Systems")]
10 | [assembly: AssemblyCopyright("Copyright © 2020 Velocity Systems")]
11 |
12 | // The assemblies that can access internals of each platform flavor of Velocity.Gestures.
13 | [assembly: InternalsVisibleTo("Velocity.Gestures.Droid")]
14 | [assembly: InternalsVisibleTo("Velocity.Gestures.iOS")]
15 | [assembly: InternalsVisibleTo("Velocity.Gestures.MacOS")]
16 | [assembly: InternalsVisibleTo("Velocity.Gestures.UWP")]
17 | [assembly: InternalsVisibleTo("Velocity.Gestures.WPF")]
18 | [assembly: InternalsVisibleTo("Velocity.Gestures.Forms.Droid")]
19 | [assembly: InternalsVisibleTo("Velocity.Gestures.Forms.iOS")]
20 | [assembly: InternalsVisibleTo("Velocity.Gestures.Forms.MacOS")]
21 | [assembly: InternalsVisibleTo("Velocity.Gestures.Forms.UWP")]
22 | [assembly: InternalsVisibleTo("Velocity.Gestures.Forms.WPF")]
23 | [assembly: InternalsVisibleTo("Velocity.Gestures.Tests")]
24 | [assembly: InternalsVisibleTo("Velocity.Gestures")]
--------------------------------------------------------------------------------
/StyleCop.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json",
3 | "settings": {
4 | "documentationRules": {
5 | "companyName": "Velocity Systems"
6 | }
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/StyleCop.ruleset:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/azure-pipelines.yml:
--------------------------------------------------------------------------------
1 | # Starter pipeline
2 | # Start with a minimal pipeline that you can customize to build and deploy your code.
3 | # Add steps that build, run tests, deploy, and more:
4 | # https://aka.ms/yaml
5 |
6 | trigger:
7 | - master
8 |
9 | stages:
10 | - stage: Prebuild
11 | jobs:
12 | - job: Tests
13 | pool:
14 | vmImage: 'ubuntu-latest'
15 |
16 | steps:
17 | - task: DotNetCoreCLI@2
18 | displayName: dotnet restore
19 | inputs:
20 | command: 'restore'
21 | projects: 'tests/Gestures.Tests/Gestures.Tests.csproj'
22 | - task: DotNetCoreCLI@2
23 | displayName: dotnet test
24 | inputs:
25 | command: 'test'
26 | projects: 'tests/Gestures.Tests/Gestures.Tests.csproj'
27 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with your package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
20 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/MainActivity.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using Android.App;
4 | using Android.Content.PM;
5 | using Android.Runtime;
6 | using Android.OS;
7 |
8 | namespace Velocity.Gestures.Forms.Sample.Droid
9 | {
10 | [Activity(Label = "Gestures.Forms.Sample", Icon = "@mipmap/icon", Theme = "@style/MainTheme", MainLauncher = true, ConfigurationChanges = ConfigChanges.ScreenSize | ConfigChanges.Orientation)]
11 | public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity
12 | {
13 | protected override void OnCreate(Bundle savedInstanceState)
14 | {
15 | TabLayoutResource = Resource.Layout.Tabbar;
16 | ToolbarResource = Resource.Layout.Toolbar;
17 |
18 | base.OnCreate(savedInstanceState);
19 |
20 | Xamarin.Essentials.Platform.Init(this, savedInstanceState);
21 | global::Xamarin.Forms.Forms.Init(this, savedInstanceState);
22 | Velocity.Gestures.Forms.Droid.Platform.Init();
23 | LoadApplication(new App());
24 | }
25 | public override void OnRequestPermissionsResult(int requestCode, string[] permissions, [GeneratedEnum] Android.Content.PM.Permission[] grantResults)
26 | {
27 | Xamarin.Essentials.Platform.OnRequestPermissionsResult(requestCode, permissions, grantResults);
28 |
29 | base.OnRequestPermissionsResult(requestCode, permissions, grantResults);
30 | }
31 | }
32 | }
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Gestures.Forms.Sample.Droid")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("Gestures.Forms.Sample.Droid")]
14 | [assembly: AssemblyCopyright("Copyright © 2014")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | [assembly: AssemblyVersion("1.0.0.0")]
26 | [assembly: AssemblyFileVersion("1.0.0.0")]
27 |
28 | // Add some common permissions, these can be removed if not needed
29 | [assembly: UsesPermission(Android.Manifest.Permission.Internet)]
30 | [assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
31 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable-hdpi/
12 | icon.png
13 |
14 | drawable-ldpi/
15 | icon.png
16 |
17 | drawable-mdpi/
18 | icon.png
19 |
20 | layout/
21 | main.xml
22 |
23 | values/
24 | strings.xml
25 |
26 | In order to get the build system to recognize Android resources, set the build action to
27 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
28 | instead operate on resource IDs. When you compile an Android application that uses resources,
29 | the build system will package the resources for distribution and generate a class called
30 | "Resource" that contains the tokens for each one of the resources included. For example,
31 | for the above Resources layout, this is what the Resource class would expose:
32 |
33 | public class Resource {
34 | public class drawable {
35 | public const int icon = 0x123;
36 | }
37 |
38 | public class layout {
39 | public const int main = 0x456;
40 | }
41 |
42 | public class strings {
43 | public const int first_string = 0xabc;
44 | public const int second_string = 0xbcd;
45 | }
46 | }
47 |
48 | You would then use R.drawable.icon to reference the drawable/icon.png file, or Resource.layout.main
49 | to reference the layout/main.xml file, or Resource.strings.first_string to reference the first
50 | string in the dictionary file values/strings.xml.
51 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/drawable/xamarin_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/drawable/xamarin_logo.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/layout/Tabbar.xml:
--------------------------------------------------------------------------------
1 |
2 |
12 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/layout/Toolbar.xml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-anydpi-v26/icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-anydpi-v26/icon_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-hdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-hdpi/icon.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-hdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-hdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-mdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-mdpi/icon.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-mdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-mdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xhdpi/icon.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xxhdpi/icon.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xxxhdpi/icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xxxhdpi/icon.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xxxhdpi/launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.Droid/Resources/mipmap-xxxhdpi/launcher_foreground.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #FFFFFF
4 | #3F51B5
5 | #303F9F
6 | #FF4081
7 |
8 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.Droid/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
6 |
7 |
26 |
27 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using AppKit;
2 | using Foundation;
3 | using Xamarin.Forms.Platform.MacOS;
4 |
5 | namespace Velocity.Gestures.Forms.Sample.MacOS
6 | {
7 | [Register("AppDelegate")]
8 | public class AppDelegate : FormsApplicationDelegate
9 | {
10 | NSWindow window;
11 |
12 | public AppDelegate()
13 | {
14 | var style = NSWindowStyle.Closable | NSWindowStyle.Resizable | NSWindowStyle.Titled;
15 |
16 | var rect = new CoreGraphics.CGRect(200, 1000, 1024, 768);
17 | window = new NSWindow(rect, style, NSBackingStore.Buffered, false);
18 | window.Title = "Xamarin.Forms on Mac!"; // choose your own Title here
19 | window.TitleVisibility = NSWindowTitleVisibility.Hidden;
20 | }
21 |
22 | public override NSWindow MainWindow
23 | {
24 | get { return window; }
25 | }
26 |
27 | public override void DidFinishLaunching(NSNotification notification)
28 | {
29 | Xamarin.Forms.Forms.Init();
30 | Velocity.Gestures.Forms.MacOS.Platform.Init();
31 | LoadApplication(new App());
32 | base.DidFinishLaunching(notification);
33 | }
34 |
35 | public override void WillTerminate(NSNotification notification)
36 | {
37 | // Insert code here to tear down your application
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "filename": "AppIcon-16.png",
5 | "size": "16x16",
6 | "scale": "1x",
7 | "idiom": "mac"
8 | },
9 | {
10 | "filename": "AppIcon-16@2x.png",
11 | "size": "16x16",
12 | "scale": "2x",
13 | "idiom": "mac"
14 | },
15 | {
16 | "filename": "AppIcon-32.png",
17 | "size": "32x32",
18 | "scale": "1x",
19 | "idiom": "mac"
20 | },
21 | {
22 | "filename": "AppIcon-32@2x.png",
23 | "size": "32x32",
24 | "scale": "2x",
25 | "idiom": "mac"
26 | },
27 | {
28 | "filename": "AppIcon-128.png",
29 | "size": "128x128",
30 | "scale": "1x",
31 | "idiom": "mac"
32 | },
33 | {
34 | "filename": "AppIcon-128@2x.png",
35 | "size": "128x128",
36 | "scale": "2x",
37 | "idiom": "mac"
38 | },
39 | {
40 | "filename": "AppIcon-256.png",
41 | "size": "256x256",
42 | "scale": "1x",
43 | "idiom": "mac"
44 | },
45 | {
46 | "filename": "AppIcon-256@2x.png",
47 | "size": "256x256",
48 | "scale": "2x",
49 | "idiom": "mac"
50 | },
51 | {
52 | "filename": "AppIcon-512.png",
53 | "size": "512x512",
54 | "scale": "1x",
55 | "idiom": "mac"
56 | },
57 | {
58 | "filename": "AppIcon-512@2x.png",
59 | "size": "512x512",
60 | "scale": "2x",
61 | "idiom": "mac"
62 | }
63 | ],
64 | "info": {
65 | "version": 1,
66 | "author": "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleName
6 | Gestures.Forms.Sample.MacOS
7 | CFBundleIdentifier
8 | velocitysystems.Gestures-Forms-Sample-MacOS
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1
13 | LSMinimumSystemVersion
14 | 10.15
15 | CFBundleDevelopmentRegion
16 | en
17 | CFBundleInfoDictionaryVersion
18 | 6.0
19 | CFBundlePackageType
20 | APPL
21 | CFBundleSignature
22 | ????
23 | NSHumanReadableCopyright
24 | ${AuthorCopyright:HtmlEncode}
25 | NSPrincipalClass
26 | NSApplication
27 | NSMainStoryboardFile
28 | Main
29 | XSAppIconAssets
30 | Assets.xcassets/AppIcon.appiconset
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/Main.cs:
--------------------------------------------------------------------------------
1 | using AppKit;
2 |
3 | namespace Velocity.Gestures.Forms.Sample.MacOS
4 | {
5 | static class MainClass
6 | {
7 | static void Main(string[] args)
8 | {
9 | NSApplication.Init();
10 | NSApplication.SharedApplication.Delegate = new AppDelegate();
11 | NSApplication.Main(args);
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/ViewController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using AppKit;
4 | using Foundation;
5 |
6 | namespace Velocity.Gestures.Forms.Sample.MacOS
7 | {
8 | public partial class ViewController : NSViewController
9 | {
10 | public ViewController(IntPtr handle) : base(handle)
11 | {
12 | }
13 |
14 | public override void ViewDidLoad()
15 | {
16 | base.ViewDidLoad();
17 |
18 | // Do any additional setup after loading the view.
19 | }
20 |
21 | public override NSObject RepresentedObject
22 | {
23 | get
24 | {
25 | return base.RepresentedObject;
26 | }
27 | set
28 | {
29 | base.RepresentedObject = value;
30 | // Update the view, if already loaded.
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.MacOS/ViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by Xamarin Studio to store outlets and
4 | // actions made in the UI designer. If it is removed, they will be lost.
5 | // Manual changes to this file may not be handled correctly.
6 | //
7 | using Foundation;
8 |
9 | namespace Gestures.Forms.Sample.MacOS
10 | {
11 | [Register("ViewController")]
12 | partial class ViewController
13 | {
14 | void ReleaseDesignerOutlets()
15 | {
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/App.xaml:
--------------------------------------------------------------------------------
1 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/LargeTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/LargeTile.scale-100.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/LargeTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/LargeTile.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/LargeTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/LargeTile.scale-400.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/SmallTile.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/SmallTile.scale-100.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/SmallTile.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/SmallTile.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/SmallTile.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/SmallTile.scale-400.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/SplashScreen.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/SplashScreen.scale-100.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/SplashScreen.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/SplashScreen.scale-400.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square150x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square150x150Logo.scale-100.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square150x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square150x150Logo.scale-400.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-16.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-256.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.altform-unplated_targetsize-48.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.scale-100.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.scale-400.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.targetsize-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.targetsize-16.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.targetsize-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.targetsize-256.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.targetsize-48.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Square44x44Logo.targetsize-48.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/StoreLogo.backup.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/StoreLogo.backup.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/StoreLogo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/StoreLogo.scale-100.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/StoreLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/StoreLogo.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/StoreLogo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/StoreLogo.scale-400.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Wide310x150Logo.scale-100.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Wide310x150Logo.scale-100.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Assets/Wide310x150Logo.scale-400.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/Assets/Wide310x150Logo.scale-400.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | namespace Velocity.Gestures.Forms.Sample.UWP
17 | {
18 | public sealed partial class MainPage
19 | {
20 | public MainPage()
21 | {
22 | this.InitializeComponent();
23 |
24 | LoadApplication(new Velocity.Gestures.Forms.Sample.App());
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Gestures.Forms.Sample.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Gestures.Forms.Sample.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2015")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/add.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/add.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.UWP/xamarin_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.UWP/xamarin_logo.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.WPF/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.WPF/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.WPF/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace Velocity.Gestures.Forms.Sample.WPF
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.WPF/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.WPF/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 | using Xamarin.Forms;
16 | using Xamarin.Forms.Platform.WPF;
17 |
18 | namespace Velocity.Gestures.Forms.Sample.WPF
19 | {
20 | ///
21 | /// Interaction logic for MainWindow.xaml
22 | ///
23 | public partial class MainWindow : FormsApplicationPage
24 | {
25 | public MainWindow()
26 | {
27 | InitializeComponent();
28 |
29 | Xamarin.Forms.Forms.Init();
30 | Velocity.Gestures.Forms.WPF.Platform.Init();
31 | LoadApplication(new Velocity.Gestures.Forms.Sample.App());
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.WPF/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Velocity.Gestures.Forms.Sample.WPF.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.6.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.WPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace Velocity.Gestures.Forms.Sample.iOS
9 | {
10 | // The UIApplicationDelegate for the application. This class is responsible for launching the
11 | // User Interface of the application, as well as listening (and optionally responding) to
12 | // application events from iOS.
13 | [Register("AppDelegate")]
14 | public partial class AppDelegate : global::Xamarin.Forms.Platform.iOS.FormsApplicationDelegate
15 | {
16 | //
17 | // This method is invoked when the application has loaded and is ready to run. In this
18 | // method you should instantiate the window, load the UI into it and then make the window
19 | // visible.
20 | //
21 | // You have 17 seconds to return from this method, or iOS will terminate your application.
22 | //
23 | public override bool FinishedLaunching(UIApplication app, NSDictionary options)
24 | {
25 | global::Xamarin.Forms.Forms.Init();
26 | Velocity.Gestures.Forms.iOS.Platform.Init();
27 | LoadApplication(new App());
28 |
29 | return base.FinishedLaunching(app, options);
30 | }
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | UIDeviceFamily
6 |
7 | 1
8 | 2
9 |
10 | UISupportedInterfaceOrientations
11 |
12 | UIInterfaceOrientationPortrait
13 | UIInterfaceOrientationLandscapeLeft
14 | UIInterfaceOrientationLandscapeRight
15 |
16 | UISupportedInterfaceOrientations~ipad
17 |
18 | UIInterfaceOrientationPortrait
19 | UIInterfaceOrientationPortraitUpsideDown
20 | UIInterfaceOrientationLandscapeLeft
21 | UIInterfaceOrientationLandscapeRight
22 |
23 | MinimumOSVersion
24 | 8.0
25 | CFBundleDisplayName
26 | Gestures.Forms.Sample
27 | CFBundleIdentifier
28 | com.companyname.Gestures.Forms.Sample
29 | CFBundleVersion
30 | 1.0
31 | UILaunchStoryboardName
32 | LaunchScreen
33 | CFBundleName
34 | Gestures.Forms.Sample
35 | XSAppIconAssets
36 | Assets.xcassets/AppIcon.appiconset
37 |
38 |
39 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 |
5 | using Foundation;
6 | using UIKit;
7 |
8 | namespace Velocity.Gestures.Forms.Sample.iOS
9 | {
10 | public class Application
11 | {
12 | // This is the main entry point of the application.
13 | static void Main(string[] args)
14 | {
15 | // if you want to use a different Application Delegate class from "AppDelegate"
16 | // you can specify it here.
17 | UIApplication.Main(args, null, "AppDelegate");
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Gestures.Forms.Sample.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Gestures.Forms.Sample.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2014")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("72bdc44f-c588-44f3-b6df-9aace7daafdd")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/Default-568h@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/Default-568h@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/Default-Portrait.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/Default-Portrait.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/Default-Portrait@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/Default-Portrait@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/Default.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/Default.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/Default@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/Default@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/tab_about.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/tab_about.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/tab_about@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/tab_about@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/tab_about@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/tab_about@3x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/tab_feed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/tab_feed.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/tab_feed@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/tab_feed@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/tab_feed@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/tab_feed@3x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/xamarin_logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/xamarin_logo.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/xamarin_logo@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/xamarin_logo@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample.iOS/Resources/xamarin_logo@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Forms.Sample.iOS/Resources/xamarin_logo@3x.png
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/App.xaml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
10 |
11 |
12 | #2196F3
13 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms;
2 | using Velocity.Gestures.Forms.Sample.Views;
3 |
4 | namespace Velocity.Gestures.Forms.Sample
5 | {
6 | public partial class App : Application
7 | {
8 |
9 | public App()
10 | {
11 | InitializeComponent();
12 | MainPage = new MainPage();
13 | }
14 |
15 | protected override void OnStart()
16 | {
17 | }
18 |
19 | protected override void OnSleep()
20 | {
21 | }
22 |
23 | protected override void OnResume()
24 | {
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using Xamarin.Forms.Xaml;
2 |
3 | [assembly: XamlCompilation(XamlCompilationOptions.Compile)]
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Gestures.Forms.Sample.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | true
6 | Velocity.Gestures.Forms.Sample
7 | Velocity.Gestures.Forms.Sample
8 |
9 |
10 |
11 | portable
12 | true
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 | KeySamplePage.xaml
28 |
29 |
30 | HoverSamplePage.xaml
31 |
32 |
33 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/HoverSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/HoverSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Xamarin.Forms;
4 |
5 | namespace Velocity.Gestures.Forms.Sample.Views
6 | {
7 | public partial class HoverSamplePage : ContentPage
8 | {
9 | public HoverSamplePage()
10 | {
11 | InitializeComponent();
12 | }
13 |
14 | void OnFrameHovering(object sender, HoverEventArgs e)
15 | {
16 | HoveringStatus.Text = $"Hovering: {e.State}";
17 | }
18 |
19 | void OnFrameTouchesBegan(object sender, Point e) => Debug.WriteLine($"Touches Began: {e.X},{e.Y}");
20 | void OnFrameTouchesEnded(object sender, Point e) => Debug.WriteLine($"Touches Ended: {e.X},{e.Y}");
21 | }
22 | }
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/KeySamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/KeySamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Xamarin.Forms;
4 |
5 | namespace Velocity.Gestures.Forms.Sample.Views
6 | {
7 | public partial class KeySamplePage : ContentPage
8 | {
9 | public KeySamplePage()
10 | {
11 | InitializeComponent();
12 | }
13 |
14 | void OnPressed(object sender, KeyEventArgs e)
15 | {
16 | KeyStatus.Text = $"Pressed: {string.Join(",", e.Keys)}";
17 | }
18 |
19 | void OnKeyDown(object sender, Key e) => Debug.WriteLine($"Key Down: {e}");
20 | void OnKeyUp(object sender, Key e) => Debug.WriteLine($"Key Up: {e}");
21 | }
22 | }
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/LongPressSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/LongPressSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Xamarin.Forms;
4 |
5 | namespace Velocity.Gestures.Forms.Sample.Views
6 | {
7 | public partial class LongPressSamplePage : ContentPage
8 | {
9 | public LongPressSamplePage()
10 | {
11 | InitializeComponent();
12 | }
13 |
14 | void OnFrameLongPressed(object sender, EventArgs e) => DisplayAlert("Long Pressed", "You long-pressed.", "OK");
15 | void OnFrameTouchesBegan(object sender, Point e) => Debug.WriteLine($"Touches Began: {e.X},{e.Y}");
16 | void OnFrameTouchesEnded(object sender, Point e) => Debug.WriteLine($"Touches Ended: {e.X},{e.Y}");
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.ComponentModel;
3 | using Xamarin.Forms;
4 | using Xamarin.Forms.Xaml;
5 |
6 | namespace Velocity.Gestures.Forms.Sample.Views
7 | {
8 | // Learn more about making custom code visible in the Xamarin.Forms previewer
9 | // by visiting https://aka.ms/xamarinforms-previewer
10 | [DesignTimeVisible(false)]
11 | public partial class MainPage : TabbedPage
12 | {
13 | public MainPage()
14 | {
15 | InitializeComponent();
16 | }
17 | }
18 | }
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/PanSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/PanSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Diagnostics;
4 | using Xamarin.Forms;
5 |
6 | namespace Velocity.Gestures.Forms.Sample.Views
7 | {
8 | public partial class PanSamplePage : ContentPage
9 | {
10 | public PanSamplePage()
11 | {
12 | InitializeComponent();
13 | }
14 |
15 | void OnFramePanning(object sender, PanEventArgs e)
16 | {
17 | if (e.State == GestureState.Ended)
18 | {
19 | DisplayAlert("Panned", $"You panned.", "OK");
20 | PanningStatus.Text = "";
21 | return;
22 | }
23 |
24 | PanningStatus.Text = $"{e.TotalX},{e.TotalY}";
25 | }
26 |
27 | void OnFrameTouchesBegan(object sender, Point e) => Debug.WriteLine($"Touches Began: {e.X},{e.Y}");
28 | void OnFrameTouchesEnded(object sender, Point e) => Debug.WriteLine($"Touches Ended: {e.X},{e.Y}");
29 | }
30 | }
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/PinchSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/PinchSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Xamarin.Forms;
4 |
5 | namespace Velocity.Gestures.Forms.Sample.Views
6 | {
7 | public partial class PinchSamplePage : ContentPage
8 | {
9 | public PinchSamplePage()
10 | {
11 | InitializeComponent();
12 | }
13 |
14 | void OnFramePinching(object sender, PinchEventArgs e)
15 | {
16 | if (e.State == GestureState.Ended)
17 | {
18 | DisplayAlert("Pinched", $"You pinched.", "OK");
19 | PinchingStatus.Text = "";
20 | return;
21 | }
22 |
23 | PinchingStatus.Text = $"{e.Scale},{e.Origin}";
24 | }
25 |
26 | void OnFrameTouchesBegan(object sender, Point e) => Debug.WriteLine($"Touches Began: {e.X},{e.Y}");
27 | void OnFrameTouchesEnded(object sender, Point e) => Debug.WriteLine($"Touches Ended: {e.X},{e.Y}");
28 | }
29 | }
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/SwipeSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/SwipeSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Xamarin.Forms;
4 |
5 | namespace Velocity.Gestures.Forms.Sample.Views
6 | {
7 | public partial class SwipeSamplePage : ContentPage
8 | {
9 | public SwipeSamplePage()
10 | {
11 | InitializeComponent();
12 | }
13 |
14 | void OnFrameSwiped(object sender, SwipeEventArgs e) => DisplayAlert("Swiped", $"You swiped {e.Direction}.", "OK");
15 | void OnFrameTouchesBegan(object sender, Point e) => Debug.WriteLine($"Touches Began: {e.X},{e.Y}");
16 | void OnFrameTouchesEnded(object sender, Point e) => Debug.WriteLine($"Touches Ended: {e.X},{e.Y}");
17 | }
18 | }
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/TapSamplePage.xaml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
--------------------------------------------------------------------------------
/samples/Gestures.Forms.Sample/Views/TapSamplePage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Diagnostics;
3 | using Xamarin.Forms;
4 |
5 | namespace Velocity.Gestures.Forms.Sample.Views
6 | {
7 | public partial class TapSamplePage : ContentPage
8 | {
9 | public TapSamplePage()
10 | {
11 | InitializeComponent();
12 | }
13 |
14 | void OnFrameTapped(object sender, TapEventArgs e) => DisplayAlert("Tapped", $"You tapped {e.NumberOfTaps} time(s) with {e.NumberOfTouches} touch(es).", "OK");
15 | void OnFrameTouchesBegan(object sender, Point e) => Debug.WriteLine($"Touches Began: {e.X},{e.Y}");
16 | void OnFrameTouchesEnded(object sender, Point e) => Debug.WriteLine($"Touches Ended: {e.X},{e.Y}");
17 | }
18 | }
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Assets/AboutAssets.txt:
--------------------------------------------------------------------------------
1 | Any raw assets you want to be deployed with your application can be placed in
2 | this directory (and child directories) and given a Build Action of "AndroidAsset".
3 |
4 | These files will be deployed with your package and will be accessible using Android's
5 | AssetManager, like this:
6 |
7 | public class ReadAsset : Activity
8 | {
9 | protected override void OnCreate (Bundle bundle)
10 | {
11 | base.OnCreate (bundle);
12 |
13 | InputStream input = Assets.Open ("my_asset.txt");
14 | }
15 | }
16 |
17 | Additionally, some Android functions will automatically load asset files:
18 |
19 | Typeface tf = Typeface.CreateFromAsset (Context.Assets, "fonts/samplefont.ttf");
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Properties/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 | using Android.App;
5 |
6 | // General Information about an assembly is controlled through the following
7 | // set of attributes. Change these attribute values to modify the information
8 | // associated with an assembly.
9 | [assembly: AssemblyTitle("Gestures.Sample.Droid")]
10 | [assembly: AssemblyDescription("")]
11 | [assembly: AssemblyConfiguration("")]
12 | [assembly: AssemblyCompany("")]
13 | [assembly: AssemblyProduct("Gestures.Sample.Droid")]
14 | [assembly: AssemblyCopyright("Copyright © 2018")]
15 | [assembly: AssemblyTrademark("")]
16 | [assembly: AssemblyCulture("")]
17 | [assembly: ComVisible(false)]
18 |
19 | // Version information for an assembly consists of the following four values:
20 | //
21 | // Major Version
22 | // Minor Version
23 | // Build Number
24 | // Revision
25 | [assembly: AssemblyVersion("1.0.0.0")]
26 | [assembly: AssemblyFileVersion("1.0.0.0")]
27 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.xml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.xml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/drawable/ic_dashboard_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/drawable/ic_home_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/drawable/ic_notifications_black_24dp.xml:
--------------------------------------------------------------------------------
1 |
6 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/layout/activity_main.xml:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
18 |
19 |
28 |
29 |
30 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/menu/navigation.xml:
--------------------------------------------------------------------------------
1 |
2 |
20 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-anydpi-v26/ic_launcher.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-anydpi-v26/ic_launcher_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-anydpi-v26/icon.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-anydpi-v26/icon_round.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-hdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-hdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-hdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-hdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-mdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-mdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-mdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-mdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-xhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-xhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-xhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-xhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-xxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-xxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-xxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-xxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-xxxhdpi/ic_launcher_foreground.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/mipmap-xxxhdpi/ic_launcher_round.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.Droid/Resources/mipmap-xxxhdpi/ic_launcher_round.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/values/colors.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #2c3e50
4 | #1B3147
5 | #3498db
6 |
7 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/values/dimens.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | 16dp
4 | 16dp
5 |
6 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/values/ic_launcher_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 | #2C3E50
4 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Gestures.Sample.Droid
3 | Home
4 | Dashboard
5 | Notifications
6 |
7 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.Droid/Resources/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/AppDelegate.cs:
--------------------------------------------------------------------------------
1 | using AppKit;
2 | using Foundation;
3 |
4 | namespace Velocity.Gestures.Sample.MacOS
5 | {
6 | [Register("AppDelegate")]
7 | public class AppDelegate : NSApplicationDelegate
8 | {
9 | public AppDelegate()
10 | {
11 | }
12 |
13 | public override void DidFinishLaunching(NSNotification notification)
14 | {
15 | // Insert code here to initialize your application
16 | }
17 |
18 | public override void WillTerminate(NSNotification notification)
19 | {
20 | // Insert code here to tear down your application
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-128@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-16@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-256@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-32@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/AppIcon-512@2x.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "filename": "AppIcon-16.png",
5 | "size": "16x16",
6 | "scale": "1x",
7 | "idiom": "mac"
8 | },
9 | {
10 | "filename": "AppIcon-16@2x.png",
11 | "size": "16x16",
12 | "scale": "2x",
13 | "idiom": "mac"
14 | },
15 | {
16 | "filename": "AppIcon-32.png",
17 | "size": "32x32",
18 | "scale": "1x",
19 | "idiom": "mac"
20 | },
21 | {
22 | "filename": "AppIcon-32@2x.png",
23 | "size": "32x32",
24 | "scale": "2x",
25 | "idiom": "mac"
26 | },
27 | {
28 | "filename": "AppIcon-128.png",
29 | "size": "128x128",
30 | "scale": "1x",
31 | "idiom": "mac"
32 | },
33 | {
34 | "filename": "AppIcon-128@2x.png",
35 | "size": "128x128",
36 | "scale": "2x",
37 | "idiom": "mac"
38 | },
39 | {
40 | "filename": "AppIcon-256.png",
41 | "size": "256x256",
42 | "scale": "1x",
43 | "idiom": "mac"
44 | },
45 | {
46 | "filename": "AppIcon-256@2x.png",
47 | "size": "256x256",
48 | "scale": "2x",
49 | "idiom": "mac"
50 | },
51 | {
52 | "filename": "AppIcon-512.png",
53 | "size": "512x512",
54 | "scale": "1x",
55 | "idiom": "mac"
56 | },
57 | {
58 | "filename": "AppIcon-512@2x.png",
59 | "size": "512x512",
60 | "scale": "2x",
61 | "idiom": "mac"
62 | }
63 | ],
64 | "info": {
65 | "version": 1,
66 | "author": "xcode"
67 | }
68 | }
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleName
6 | Gestures.Sample.MacOS
7 | CFBundleIdentifier
8 | velocitysystems.Gestures-Sample-MacOS
9 | CFBundleShortVersionString
10 | 1.0
11 | CFBundleVersion
12 | 1
13 | LSMinimumSystemVersion
14 | 10.15
15 | CFBundleDevelopmentRegion
16 | en
17 | CFBundleInfoDictionaryVersion
18 | 6.0
19 | CFBundlePackageType
20 | APPL
21 | CFBundleSignature
22 | ????
23 | NSHumanReadableCopyright
24 | ${AuthorCopyright:HtmlEncode}
25 | NSPrincipalClass
26 | NSApplication
27 | NSMainStoryboardFile
28 | Main
29 | XSAppIconAssets
30 | Assets.xcassets/AppIcon.appiconset
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/Main.cs:
--------------------------------------------------------------------------------
1 | using AppKit;
2 |
3 | namespace Velocity.Gestures.Sample.MacOS
4 | {
5 | static class MainClass
6 | {
7 | static void Main(string[] args)
8 | {
9 | NSApplication.Init();
10 | NSApplication.Main(args);
11 | }
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/ViewController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using AppKit;
4 | using Foundation;
5 |
6 | namespace Velocity.Gestures.Sample.MacOS
7 | {
8 | public partial class ViewController : NSViewController
9 | {
10 | public ViewController(IntPtr handle) : base(handle)
11 | {
12 | }
13 |
14 | public override void ViewDidLoad()
15 | {
16 | base.ViewDidLoad();
17 |
18 | // Do any additional setup after loading the view.
19 | }
20 |
21 | public override NSObject RepresentedObject
22 | {
23 | get
24 | {
25 | return base.RepresentedObject;
26 | }
27 | set
28 | {
29 | base.RepresentedObject = value;
30 | // Update the view, if already loaded.
31 | }
32 | }
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.MacOS/ViewController.designer.cs:
--------------------------------------------------------------------------------
1 | // WARNING
2 | //
3 | // This file has been generated automatically by Xamarin Studio to store outlets and
4 | // actions made in the UI designer. If it is removed, they will be lost.
5 | // Manual changes to this file may not be handled correctly.
6 | //
7 | using Foundation;
8 |
9 | namespace Gestures.Sample.MacOS
10 | {
11 | [Register("ViewController")]
12 | partial class ViewController
13 | {
14 | void ReleaseDesignerOutlets()
15 | {
16 | }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/Assets/LockScreenLogo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.UWP/Assets/LockScreenLogo.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/Assets/SplashScreen.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.UWP/Assets/SplashScreen.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/Assets/Square150x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.UWP/Assets/Square150x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/Assets/Square44x44Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.UWP/Assets/Square44x44Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.UWP/Assets/Square44x44Logo.targetsize-24_altform-unplated.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/Assets/StoreLogo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.UWP/Assets/StoreLogo.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/Assets/Wide310x150Logo.scale-200.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.UWP/Assets/Wide310x150Logo.scale-200.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/MainPage.xaml:
--------------------------------------------------------------------------------
1 |
10 |
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/MainPage.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Runtime.InteropServices.WindowsRuntime;
6 | using Windows.Foundation;
7 | using Windows.Foundation.Collections;
8 | using Windows.UI.Xaml;
9 | using Windows.UI.Xaml.Controls;
10 | using Windows.UI.Xaml.Controls.Primitives;
11 | using Windows.UI.Xaml.Data;
12 | using Windows.UI.Xaml.Input;
13 | using Windows.UI.Xaml.Media;
14 | using Windows.UI.Xaml.Navigation;
15 |
16 | // The Blank Page item template is documented at https://go.microsoft.com/fwlink/?LinkId=402352&clcid=0x409
17 |
18 | namespace Velocity.Gestures.Sample.UWP
19 | {
20 | ///
21 | /// An empty page that can be used on its own or navigated to within a Frame.
22 | ///
23 | public sealed partial class MainPage : Page
24 | {
25 | public MainPage()
26 | {
27 | this.InitializeComponent();
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/Package.appxmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
13 |
14 |
15 |
16 |
17 | Gestures.Sample.UWP
18 | 350a5575-35d1-4eb8-a859-d585bf32542f
19 | Assets\StoreLogo.png
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Gestures.Sample.UWP")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Gestures.Sample.UWP")]
13 | [assembly: AssemblyCopyright("Copyright © 2020")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Version information for an assembly consists of the following four values:
18 | //
19 | // Major Version
20 | // Minor Version
21 | // Build Number
22 | // Revision
23 | //
24 | // You can specify all the values or you can default the Build and Revision Numbers
25 | // by using the '*' as shown below:
26 | // [assembly: AssemblyVersion("1.0.*")]
27 | [assembly: AssemblyVersion("1.0.0.0")]
28 | [assembly: AssemblyFileVersion("1.0.0.0")]
29 | [assembly: ComVisible(false)]
--------------------------------------------------------------------------------
/samples/Gestures.Sample.UWP/Properties/Default.rd.xml:
--------------------------------------------------------------------------------
1 |
17 |
18 |
19 |
20 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.WPF/App.config:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.WPF/App.xaml:
--------------------------------------------------------------------------------
1 |
6 |
7 |
8 |
9 |
10 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.WPF/App.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Configuration;
4 | using System.Data;
5 | using System.Linq;
6 | using System.Threading.Tasks;
7 | using System.Windows;
8 |
9 | namespace Velocity.Gestures.Sample.WPF
10 | {
11 | ///
12 | /// Interaction logic for App.xaml
13 | ///
14 | public partial class App : Application
15 | {
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.WPF/MainWindow.xaml:
--------------------------------------------------------------------------------
1 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.WPF/MainWindow.xaml.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Text;
5 | using System.Threading.Tasks;
6 | using System.Windows;
7 | using System.Windows.Controls;
8 | using System.Windows.Data;
9 | using System.Windows.Documents;
10 | using System.Windows.Input;
11 | using System.Windows.Media;
12 | using System.Windows.Media.Imaging;
13 | using System.Windows.Navigation;
14 | using System.Windows.Shapes;
15 |
16 | namespace Velocity.Gestures.Sample.WPF
17 | {
18 | ///
19 | /// Interaction logic for MainWindow.xaml
20 | ///
21 | public partial class MainWindow : Window
22 | {
23 | public MainWindow()
24 | {
25 | InitializeComponent();
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.WPF/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Velocity.Gestures.Sample.WPF.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.6.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.WPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/First.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "filename": "First.pdf",
5 | "idiom": "universal"
6 | },
7 | {
8 | "scale": "1x",
9 | "idiom": "universal"
10 | },
11 | {
12 | "scale": "2x",
13 | "idiom": "universal"
14 | },
15 | {
16 | "scale": "3x",
17 | "idiom": "universal"
18 | },
19 | {
20 | "idiom": "iphone"
21 | },
22 | {
23 | "scale": "1x",
24 | "idiom": "iphone"
25 | },
26 | {
27 | "scale": "2x",
28 | "idiom": "iphone"
29 | },
30 | {
31 | "subtype": "retina4",
32 | "scale": "2x",
33 | "idiom": "iphone"
34 | },
35 | {
36 | "scale": "3x",
37 | "idiom": "iphone"
38 | },
39 | {
40 | "idiom": "ipad"
41 | },
42 | {
43 | "scale": "1x",
44 | "idiom": "ipad"
45 | },
46 | {
47 | "scale": "2x",
48 | "idiom": "ipad"
49 | }
50 | ],
51 | "info": {
52 | "version": 1,
53 | "author": "xcode"
54 | }
55 | }
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/First.imageset/First.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/First.imageset/First.pdf
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/Second.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images": [
3 | {
4 | "filename": "Second.pdf",
5 | "idiom": "universal"
6 | },
7 | {
8 | "scale": "1x",
9 | "idiom": "universal"
10 | },
11 | {
12 | "scale": "2x",
13 | "idiom": "universal"
14 | },
15 | {
16 | "scale": "3x",
17 | "idiom": "universal"
18 | },
19 | {
20 | "idiom": "iphone"
21 | },
22 | {
23 | "scale": "1x",
24 | "idiom": "iphone"
25 | },
26 | {
27 | "scale": "2x",
28 | "idiom": "iphone"
29 | },
30 | {
31 | "subtype": "retina4",
32 | "scale": "2x",
33 | "idiom": "iphone"
34 | },
35 | {
36 | "scale": "3x",
37 | "idiom": "iphone"
38 | },
39 | {
40 | "idiom": "ipad"
41 | },
42 | {
43 | "scale": "1x",
44 | "idiom": "ipad"
45 | },
46 | {
47 | "scale": "2x",
48 | "idiom": "ipad"
49 | }
50 | ],
51 | "info": {
52 | "version": 1,
53 | "author": "xcode"
54 | }
55 | }
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Assets.xcassets/Second.imageset/Second.pdf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/velocitysystems/gestures/5819c1a6746983231b96cb006d6a0c4b1eab97e0/samples/Gestures.Sample.iOS/Assets.xcassets/Second.imageset/Second.pdf
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Entitlements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/FirstViewController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using UIKit;
4 |
5 | namespace Velocity.Gestures.Sample.iOS
6 | {
7 | public partial class FirstViewController : UIViewController
8 | {
9 | public FirstViewController (IntPtr handle) : base (handle)
10 | {
11 | }
12 |
13 | public override void ViewDidLoad ()
14 | {
15 | base.ViewDidLoad ();
16 | // Perform any additional setup after loading the view, typically from a nib.
17 | }
18 |
19 | public override void DidReceiveMemoryWarning ()
20 | {
21 | base.DidReceiveMemoryWarning ();
22 | // Release any cached data, images, etc that aren't in use.
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/FirstViewController.designer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // This file has been generated automatically by Visual Studio to store outlets and
3 | // actions made in the Xcode designer. If it is removed, they will be lost.
4 | // Manual changes to this file may not be handled correctly.
5 | //
6 | using Foundation;
7 |
8 | namespace Gestures.Sample.iOS
9 | {
10 | [Register ("FirstViewController")]
11 | partial class FirstViewController
12 | {
13 | void ReleaseDesignerOutlets ()
14 | {
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Main.cs:
--------------------------------------------------------------------------------
1 | using UIKit;
2 |
3 | namespace Velocity.Gestures.Sample.iOS
4 | {
5 | public class Application
6 | {
7 | // This is the main entry point of the application.
8 | static void Main(string[] args)
9 | {
10 | // if you want to use a different Application Delegate class from "AppDelegate"
11 | // you can specify it here.
12 | UIApplication.Main(args, null, "AppDelegate");
13 | }
14 | }
15 | }
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 | using System.Runtime.InteropServices;
4 |
5 | // General Information about an assembly is controlled through the following
6 | // set of attributes. Change these attribute values to modify the information
7 | // associated with an assembly.
8 | [assembly: AssemblyTitle("Gestures.Sample.iOS")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("")]
12 | [assembly: AssemblyProduct("Gestures.Sample.iOS")]
13 | [assembly: AssemblyCopyright("Copyright © 2017")]
14 | [assembly: AssemblyTrademark("")]
15 | [assembly: AssemblyCulture("")]
16 |
17 | // Setting ComVisible to false makes the types in this assembly not visible
18 | // to COM components. If you need to access a type in this assembly from
19 | // COM, set the ComVisible attribute to true on that type.
20 | [assembly: ComVisible(false)]
21 |
22 | // The following GUID is for the ID of the typelib if this project is exposed to COM
23 | [assembly: Guid("50c7b8c9-e664-45af-b88e-0c9b8b9c1be1")]
24 |
25 | // Version information for an assembly consists of the following four values:
26 | //
27 | // Major Version
28 | // Minor Version
29 | // Build Number
30 | // Revision
31 | //
32 | // You can specify all the values or you can default the Build and Revision Numbers
33 | // by using the '*' as shown below:
34 | // [assembly: AssemblyVersion("1.0.*")]
35 | [assembly: AssemblyVersion("1.0.0.0")]
36 | [assembly: AssemblyFileVersion("1.0.0.0")]
37 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/SecondViewController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 |
3 | using UIKit;
4 |
5 | namespace Velocity.Gestures.Sample.iOS
6 | {
7 | public partial class SecondViewController : UIViewController
8 | {
9 | public SecondViewController (IntPtr handle) : base (handle)
10 | {
11 | }
12 |
13 | public override void ViewDidLoad ()
14 | {
15 | base.ViewDidLoad ();
16 | // Perform any additional setup after loading the view, typically from a nib.
17 | }
18 |
19 | public override void DidReceiveMemoryWarning ()
20 | {
21 | base.DidReceiveMemoryWarning ();
22 | // Release any cached data, images, etc that aren't in use.
23 | }
24 | }
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/samples/Gestures.Sample.iOS/SecondViewController.designer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // This file has been generated automatically by Visual Studio to store outlets and
3 | // actions made in the Xcode designer. If it is removed, they will be lost.
4 | // Manual changes to this file may not be handled correctly.
5 | //
6 | using Foundation;
7 |
8 | namespace Gestures.Sample.iOS
9 | {
10 | [Register ("SecondViewController")]
11 | partial class SecondViewController
12 | {
13 | void ReleaseDesignerOutlets ()
14 | {
15 | }
16 | }
17 | }
--------------------------------------------------------------------------------
/src/Gestures.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.xml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.xml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
--------------------------------------------------------------------------------
/src/Gestures.Droid/Resources/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hello World, Click Me!
3 | Gestures.Droid
4 |
5 |
--------------------------------------------------------------------------------
/src/Gestures.Forms.Droid/Platform.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures.Forms.Droid
6 | {
7 | ///
8 | /// Platform support for gestures.
9 | ///
10 | public static class Platform
11 | {
12 | ///
13 | /// Initialize platform support for gestures.
14 | ///
15 | public static void Init()
16 | {
17 | RecognizerPlatformEffect.Init();
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms.Droid/Resources/AboutResources.txt:
--------------------------------------------------------------------------------
1 | Images, layout descriptions, binary blobs and string dictionaries can be included
2 | in your application as resource files. Various Android APIs are designed to
3 | operate on the resource IDs instead of dealing with images, strings or binary blobs
4 | directly.
5 |
6 | For example, a sample Android app that contains a user interface layout (main.xml),
7 | an internationalization string table (strings.xml) and some icons (drawable-XXX/icon.png)
8 | would keep its resources in the "Resources" directory of the application:
9 |
10 | Resources/
11 | drawable/
12 | icon.png
13 |
14 | layout/
15 | main.xml
16 |
17 | values/
18 | strings.xml
19 |
20 | In order to get the build system to recognize Android resources, set the build action to
21 | "AndroidResource". The native Android APIs do not operate directly with filenames, but
22 | instead operate on resource IDs. When you compile an Android application that uses resources,
23 | the build system will package the resources for distribution and generate a class called "R"
24 | (this is an Android convention) that contains the tokens for each one of the resources
25 | included. For example, for the above Resources layout, this is what the R class would expose:
26 |
27 | public class R {
28 | public class drawable {
29 | public const int icon = 0x123;
30 | }
31 |
32 | public class layout {
33 | public const int main = 0x456;
34 | }
35 |
36 | public class strings {
37 | public const int first_string = 0xabc;
38 | public const int second_string = 0xbcd;
39 | }
40 | }
41 |
42 | You would then use R.drawable.icon to reference the drawable/icon.png file, or R.layout.main
43 | to reference the layout/main.xml file, or R.strings.first_string to reference the first
44 | string in the dictionary file values/strings.xml.
--------------------------------------------------------------------------------
/src/Gestures.Forms.Droid/Resources/values/strings.xml:
--------------------------------------------------------------------------------
1 |
2 | Hello World, Click Me!
3 | Gestures.Forms.Droid
4 |
5 |
--------------------------------------------------------------------------------
/src/Gestures.Forms.MacOS/Platform.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures.Forms.MacOS
6 | {
7 | ///
8 | /// Platform support for gestures.
9 | ///
10 | public static class Platform
11 | {
12 | ///
13 | /// Initialize platform support for gestures.
14 | ///
15 | public static void Init()
16 | {
17 | RecognizerPlatformEffect.Init();
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms.UWP/Platform.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | [assembly: Xamarin.Forms.ResolutionGroupName("Velocity")]
6 |
7 | namespace Velocity.Gestures.Forms.UWP
8 | {
9 | ///
10 | /// Platform support for gestures.
11 | ///
12 | public static class Platform
13 | {
14 | ///
15 | /// Initialize platform support for gestures.
16 | ///
17 | public static void Init()
18 | {
19 | RecognizerPlatformEffect.Init();
20 | }
21 | }
22 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms.UWP/Properties/Gestures.Forms.UWP.rd.xml:
--------------------------------------------------------------------------------
1 |
2 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/Gestures.Forms.WPF/Platform.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures.Forms.WPF
6 | {
7 | ///
8 | /// Platform support for gestures.
9 | ///
10 | public static class Platform
11 | {
12 | ///
13 | /// Initialize platform support for gestures.
14 | ///
15 | public static void Init()
16 | {
17 | RecognizerPlatformEffect.Init();
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms.WPF/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Velocity.Gestures.Forms.WPF.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.6.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Gestures.Forms.WPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Gestures.Forms.WPF/Themes/Generic.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
--------------------------------------------------------------------------------
/src/Gestures.Forms.iOS/Platform.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures.Forms.iOS
6 | {
7 | ///
8 | /// Platform support for gestures.
9 | ///
10 | public static class Platform
11 | {
12 | ///
13 | /// Initialize platform support for gestures.
14 | ///
15 | public static void Init()
16 | {
17 | RecognizerPlatformEffect.Init();
18 | }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Effects/ListenerEffect.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures.Forms
6 | {
7 | using Xamarin.Forms;
8 |
9 | ///
10 | /// that provides platform support for listeners.
11 | ///
12 | public class ListenerEffect : RoutingEffect
13 | {
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | public ListenerEffect() : base("Velocity.ListenerEffect")
18 | {
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Effects/RecognizerEffect.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures.Forms
6 | {
7 | using Xamarin.Forms;
8 |
9 | ///
10 | /// that provides platform support for recognizers.
11 | ///
12 | public class RecognizerEffect : RoutingEffect
13 | {
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | public RecognizerEffect() : base("Velocity.RecognizerEffect")
18 | {
19 | }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Events/HoverEventArgs.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures.Forms
8 | {
9 | ///
10 | /// Hover event arguments.
11 | ///
12 | public sealed class HoverEventArgs : EventArgs
13 | {
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | /// The hover event.
18 | internal HoverEventArgs(HoverEvent e)
19 | {
20 | State = e.State;
21 | }
22 |
23 | ///
24 | /// Gets the gesture state.
25 | ///
26 | public GestureState State { get; }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Events/KeyEventArgs.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures.Forms
8 | {
9 | ///
10 | /// Key event arguments.
11 | ///
12 | public sealed class KeyEventArgs : EventArgs
13 | {
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | /// The key(s) pressed.
18 | internal KeyEventArgs(params Key[] keys)
19 | {
20 | Keys = keys;
21 | }
22 |
23 | ///
24 | /// Gets the key(s) pressed as an array of .
25 | ///
26 | public Key[] Keys { get; }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Events/PanEventArgs.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures.Forms
8 | {
9 | ///
10 | /// Pan event arguments.
11 | ///
12 | public sealed class PanEventArgs : EventArgs
13 | {
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | /// The pan event.
18 | internal PanEventArgs(PanEvent e)
19 | {
20 | State = e.State;
21 | TotalX = e.TotalX;
22 | TotalY = e.TotalY;
23 | }
24 |
25 | ///
26 | /// Gets the gesture state.
27 | ///
28 | public GestureState State { get; }
29 |
30 | ///
31 | /// Gets the translation along the X-axis.
32 | ///
33 | public double TotalX { get; }
34 |
35 | ///
36 | /// Gets the translation along the Y-axis.
37 | ///
38 | public double TotalY { get; }
39 | }
40 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Events/PinchEventArgs.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures.Forms
8 | {
9 | ///
10 | /// Pinch event arguments.
11 | ///
12 | public sealed class PinchEventArgs : EventArgs
13 | {
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | /// The pinch event.
18 | internal PinchEventArgs(PinchEvent e)
19 | {
20 | State = e.State;
21 | Scale = e.Scale;
22 | Origin = e.Origin;
23 | }
24 |
25 | ///
26 | /// Gets the gesture state.
27 | ///
28 | public GestureState State { get; }
29 |
30 | ///
31 | /// Gets the pinch scale.
32 | ///
33 | public double Scale { get; }
34 |
35 | ///
36 | /// Gets the pinch origin.
37 | ///
38 | public Point Origin { get; }
39 | }
40 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Events/SwipeEventArgs.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures.Forms
8 | {
9 | ///
10 | /// Swipe event arguments.
11 | ///
12 | public sealed class SwipeEventArgs : EventArgs
13 | {
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | /// The swipe direction.
18 | internal SwipeEventArgs(SwipeDirection direction)
19 | {
20 | Direction = direction;
21 | }
22 |
23 | ///
24 | /// Gets the swipe direction.
25 | ///
26 | public SwipeDirection Direction { get; }
27 | }
28 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Events/TapEventArgs.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures.Forms
8 | {
9 | ///
10 | /// Tap event arguments.
11 | ///
12 | public sealed class TapEventArgs : EventArgs
13 | {
14 | ///
15 | /// Initializes a new instance of the class.
16 | ///
17 | /// The number of touches received.
18 | /// The number of taps received.
19 | internal TapEventArgs(int numberOfTouches, int numberOfTaps)
20 | {
21 | NumberOfTouches = numberOfTouches;
22 | NumberOfTaps = numberOfTaps;
23 | }
24 |
25 | ///
26 | /// Gets the number of touches received.
27 | ///
28 | public int NumberOfTouches { get; }
29 |
30 | ///
31 | /// Gets the number of taps received.
32 | ///
33 | public int NumberOfTaps { get; }
34 | }
35 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Extensions/GestureListenerEx.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.Reactive.Disposables;
7 | using Xamarin.Forms;
8 |
9 | namespace Velocity.Gestures.Forms
10 | {
11 | ///
12 | /// Extensions for .
13 | ///
14 | public static class GestureListenerEx
15 | {
16 | ///
17 | /// Bind the to the .
18 | ///
19 | /// The native view.
20 | /// The native listener.
21 | /// The XF listener.
22 | /// The XF view.
23 | /// The disposable used to clean up subscriptions.
24 | /// The native key listener.
25 | public static IKeyListener Bind(
26 | this IKeyListener nativeListener,
27 | KeyGestureListener formsListener,
28 | View sender,
29 | CompositeDisposable disposable) where TView : class
30 | {
31 | nativeListener.Pressed.Subscribe(keys => formsListener.InvokePressed(sender, keys)).DisposeWith(disposable);
32 | nativeListener.KeyDown.Subscribe(key => formsListener.InvokeKeyDown(sender, key)).DisposeWith(disposable);
33 | nativeListener.KeyUp.Subscribe(key => formsListener.InvokeKeyUp(sender, key)).DisposeWith(disposable);
34 |
35 | return nativeListener;
36 | }
37 | }
38 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Gestures.Forms.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | false
6 | ..\..\StyleCop.ruleset
7 | Velocity.Gestures.Forms
8 | Velocity.Gestures.Forms
9 |
10 |
11 |
12 |
13 | all
14 | runtime; build; native; contentfiles; analyzers; buildtransitive
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 | SolutionInfo.cs
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/Gestures.Forms/Recognizers/HoverGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.Windows.Input;
7 | using Xamarin.Forms;
8 |
9 | namespace Velocity.Gestures.Forms
10 | {
11 | ///
12 | /// A multi-touch hover gesture recognizer.
13 | ///
14 | public class HoverGestureRecognizer : GestureRecognizer
15 | {
16 | ///
17 | /// The hovering event handler.
18 | ///
19 | public event EventHandler Hovering;
20 |
21 | ///
22 | /// Invoke the hovering event.
23 | ///
24 | /// The sender.
25 | /// The hover event.
26 | internal void InvokeHovering(View sender, HoverEvent e)
27 | {
28 | Hovering?.Invoke(sender, new HoverEventArgs(e));
29 | if (e.State == GestureState.Ended && Command is ICommand cmd && cmd.CanExecute(CommandParameter))
30 | {
31 | cmd.Execute(CommandParameter);
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Recognizers/LongPressGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.Windows.Input;
7 | using Xamarin.Forms;
8 |
9 | namespace Velocity.Gestures.Forms
10 | {
11 | ///
12 | /// A multi-touch long-press gesture recognizer.
13 | ///
14 | public class LongPressGestureRecognizer : GestureRecognizer
15 | {
16 | ///
17 | /// The long-pressed event handler.
18 | ///
19 | public event EventHandler LongPressed;
20 |
21 | ///
22 | /// Invoke the long-pressed event.
23 | ///
24 | /// The sender.
25 | internal void InvokeLongPressed(View sender)
26 | {
27 | LongPressed?.Invoke(sender, null);
28 | if (Command is ICommand cmd && cmd.CanExecute(CommandParameter))
29 | {
30 | cmd.Execute(CommandParameter);
31 | }
32 | }
33 | }
34 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Recognizers/PanGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.Windows.Input;
7 | using Xamarin.Forms;
8 |
9 | namespace Velocity.Gestures.Forms
10 | {
11 | ///
12 | /// A multi-touch pan gesture recognizer.
13 | ///
14 | public class PanGestureRecognizer : GestureRecognizer
15 | {
16 | ///
17 | /// The panning event handler.
18 | ///
19 | public event EventHandler Panning;
20 |
21 | ///
22 | /// Invoke the panning event.
23 | ///
24 | /// The sender.
25 | /// The pan event.
26 | internal void InvokePanning(View sender, PanEvent e)
27 | {
28 | Panning?.Invoke(sender, new PanEventArgs(e));
29 | if (e.State == GestureState.Ended && Command is ICommand cmd && cmd.CanExecute(CommandParameter))
30 | {
31 | cmd.Execute(CommandParameter);
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Recognizers/PinchGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.Windows.Input;
7 | using Xamarin.Forms;
8 |
9 | namespace Velocity.Gestures.Forms
10 | {
11 | ///
12 | /// A multi-touch pinch gesture recognizer.
13 | ///
14 | public class PinchGestureRecognizer : GestureRecognizer
15 | {
16 | ///
17 | /// The pinching event handler.
18 | ///
19 | public event EventHandler Pinching;
20 |
21 | ///
22 | /// Invoke the pinching event.
23 | ///
24 | /// The sender.
25 | /// The pinch event.
26 | internal void InvokePinching(View sender, PinchEvent e)
27 | {
28 | Pinching?.Invoke(sender, new PinchEventArgs(e));
29 | if (e.State == GestureState.Ended && Command is ICommand cmd && cmd.CanExecute(CommandParameter))
30 | {
31 | cmd.Execute(CommandParameter);
32 | }
33 | }
34 | }
35 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Recognizers/SwipeGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.Windows.Input;
7 | using Xamarin.Forms;
8 |
9 | namespace Velocity.Gestures.Forms
10 | {
11 | ///
12 | /// A multi-touch swipe gesture recognizer.
13 | ///
14 | public class SwipeGestureRecognizer : GestureRecognizer
15 | {
16 | ///
17 | /// The swiped event handler.
18 | ///
19 | public event EventHandler Swiped;
20 |
21 | ///
22 | /// The bindable swipe direction mask property.
23 | ///
24 | public static readonly BindableProperty DirectionMaskProperty = BindableProperty.Create(
25 | nameof(DirectionMask),
26 | typeof(SwipeDirection),
27 | typeof(SwipeGestureRecognizer),
28 | SwipeDirection.Any);
29 |
30 | ///
31 | /// Gets the swipe direction mask.
32 | ///
33 | public SwipeDirection DirectionMask
34 | {
35 | get { return (SwipeDirection)GetValue(DirectionMaskProperty); }
36 | set { SetValue(DirectionMaskProperty, value); }
37 | }
38 |
39 | ///
40 | /// Invoke the swiped event.
41 | ///
42 | /// The sender.
43 | /// The swipe direction.
44 | internal void InvokeSwiped(View sender, SwipeDirection direction)
45 | {
46 | Swiped?.Invoke(sender, new SwipeEventArgs(direction));
47 | if (Command is ICommand cmd && cmd.CanExecute(CommandParameter))
48 | {
49 | cmd.Execute(CommandParameter);
50 | }
51 | }
52 | }
53 | }
--------------------------------------------------------------------------------
/src/Gestures.Forms/Recognizers/TapGestureRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.Windows.Input;
7 | using Xamarin.Forms;
8 |
9 | namespace Velocity.Gestures.Forms
10 | {
11 | ///
12 | /// A multi-touch tap gesture recognizer.
13 | ///
14 | public class TapGestureRecognizer : GestureRecognizer
15 | {
16 | ///
17 | /// The tapped event handler.
18 | ///
19 | public event EventHandler Tapped;
20 |
21 | ///
22 | /// The bindable number of taps required property.
23 | ///
24 | public static readonly BindableProperty NumberOfTapsRequiredProperty = BindableProperty.Create(
25 | nameof(NumberOfTapsRequired),
26 | typeof(int),
27 | typeof(TapGestureRecognizer),
28 | 1);
29 |
30 | ///
31 | /// Gets or sets the number of taps required.
32 | ///
33 | public int NumberOfTapsRequired
34 | {
35 | get { return (int)GetValue(NumberOfTapsRequiredProperty); }
36 | set { SetValue(NumberOfTapsRequiredProperty, value); }
37 | }
38 |
39 | ///
40 | /// Invoke the tapped event.
41 | ///
42 | /// The sender.
43 | internal void InvokeTapped(View sender)
44 | {
45 | Tapped?.Invoke(sender, new TapEventArgs(NumberOfTouchesRequired, NumberOfTapsRequired));
46 | if (Command is ICommand cmd && cmd.CanExecute(CommandParameter))
47 | {
48 | cmd.Execute(CommandParameter);
49 | }
50 | }
51 | }
52 | }
--------------------------------------------------------------------------------
/src/Gestures.MacOS/Listeners/KeyListener.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using AppKit;
6 | using Velocity.Gestures.MacOs;
7 |
8 | namespace Velocity.Gestures.MacOS
9 | {
10 | ///
11 | /// A key interaction listener.
12 | ///
13 | public class KeyListener : PlatformKeyListener
14 | {
15 | private readonly NSView _keyTrackingView;
16 |
17 | ///
18 | /// Initializes a new instance of the class.
19 | ///
20 | /// The native view.
21 | public KeyListener(NSView view) : base(view)
22 | {
23 | _keyTrackingView = new KeyTrackingView(this);
24 | view.AddSubview(_keyTrackingView);
25 | }
26 |
27 | ///
28 | public override void Dispose()
29 | {
30 | _keyTrackingView.RemoveFromSuperview();
31 | }
32 |
33 | private class KeyTrackingView : NSView
34 | {
35 | private readonly KeyListener _listener;
36 |
37 | public KeyTrackingView(KeyListener listener)
38 | {
39 | _listener = listener;
40 | }
41 |
42 | public override bool AcceptsFirstResponder() => true;
43 |
44 | public override void KeyDown(NSEvent theEvent) => _listener.OnKeyDown(theEvent.ToKey());
45 |
46 | public override void KeyUp(NSEvent theEvent) => _listener.OnKeyUp(theEvent.ToKey());
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/src/Gestures.MacOS/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | using System.Reflection;
2 | using System.Runtime.CompilerServices;
3 |
4 | // Information about this assembly is defined by the following attributes.
5 | // Change them to the values specific to your project.
6 |
7 | [assembly: AssemblyTitle("Gestures.MacOS")]
8 | [assembly: AssemblyDescription("")]
9 | [assembly: AssemblyConfiguration("")]
10 | [assembly: AssemblyCompany("")]
11 | [assembly: AssemblyProduct("")]
12 | [assembly: AssemblyCopyright("${AuthorCopyright}")]
13 | [assembly: AssemblyTrademark("")]
14 | [assembly: AssemblyCulture("")]
15 |
16 | // The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
17 | // The form "{Major}.{Minor}.*" will automatically update the build and revision,
18 | // and "{Major}.{Minor}.{Build}.*" will update just the revision.
19 |
20 | [assembly: AssemblyVersion("1.0.*")]
21 |
22 | // The following attributes are used to specify the signing key for the assembly,
23 | // if desired. See the Mono documentation for more information about signing.
24 |
25 | //[assembly: AssemblyDelaySign(false)]
26 | //[assembly: AssemblyKeyFile("")]
27 |
--------------------------------------------------------------------------------
/src/Gestures.UWP/Extensions/VirtualKeyEx.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using Windows.System;
6 |
7 | namespace Velocity.Gestures.UWP
8 | {
9 | ///
10 | /// Extensions for .
11 | ///
12 | public static class VirtualKeyEx
13 | {
14 | ///
15 | /// Convert to a .
16 | ///
17 | /// The .
18 | /// The .
19 | public static Key ToKey(this VirtualKey key) => (Key)key;
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Gestures.UWP/Listeners/KeyListener.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using Windows.UI.Core;
6 | using Windows.UI.Xaml;
7 |
8 | namespace Velocity.Gestures.UWP
9 | {
10 | ///
11 | /// A key interaction listener.
12 | ///
13 | public class KeyListener : PlatformKeyListener
14 | {
15 | ///
16 | /// Initializes a new instance of the class.
17 | ///
18 | /// The native view.
19 | public KeyListener(FrameworkElement view) : base(view)
20 | {
21 | Window.Current.CoreWindow.KeyDown += OnKeyDown;
22 | Window.Current.CoreWindow.KeyUp += OnKeyUp;
23 | }
24 |
25 | ///
26 | public override void Dispose()
27 | {
28 | Window.Current.CoreWindow.KeyDown -= OnKeyDown;
29 | Window.Current.CoreWindow.KeyUp -= OnKeyUp;
30 | }
31 |
32 | private void OnKeyDown(object sender, KeyEventArgs e) => OnKeyDown(e.VirtualKey.ToKey());
33 |
34 | private void OnKeyUp(object sender, KeyEventArgs e) => OnKeyUp(e.VirtualKey.ToKey());
35 | }
36 | }
--------------------------------------------------------------------------------
/src/Gestures.UWP/Properties/Gestures.UWP.rd.xml:
--------------------------------------------------------------------------------
1 |
2 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
--------------------------------------------------------------------------------
/src/Gestures.UWP/Recognizers/HoverRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using Windows.UI.Xaml;
6 | using Windows.UI.Xaml.Input;
7 |
8 | namespace Velocity.Gestures.UWP
9 | {
10 | ///
11 | /// A multi-touch hover gesture recognizer.
12 | ///
13 | public class HoverRecognizer : PlatformHoverRecognizer
14 | {
15 | ///
16 | /// Initializes a new instance of the class.
17 | ///
18 | /// The native view.
19 | public HoverRecognizer(FrameworkElement view) : base(view)
20 | {
21 | View.PointerEntered += OnPointerEntered;
22 | View.PointerExited += OnPointerExited;
23 | }
24 |
25 | ///
26 | public override void Dispose()
27 | {
28 | View.PointerEntered -= OnPointerEntered;
29 | View.PointerExited -= OnPointerExited;
30 | }
31 |
32 | private void OnPointerEntered(object sender, PointerRoutedEventArgs e)
33 | {
34 | var point = e.GetCurrentPoint(View);
35 | OnTouchesBegan(point.Position.X, point.Position.Y);
36 | OnHoveringStateChanged(GestureState.Began);
37 | }
38 |
39 | private void OnPointerExited(object sender, PointerRoutedEventArgs e)
40 | {
41 | var point = e.GetCurrentPoint(View);
42 | OnHoveringStateChanged(GestureState.Ended);
43 | OnTouchesEnded(point.Position.X, point.Position.Y);
44 | }
45 | }
46 | }
--------------------------------------------------------------------------------
/src/Gestures.UWP/Recognizers/LongPressRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using Windows.UI.Xaml;
6 | using Windows.UI.Xaml.Input;
7 |
8 | namespace Velocity.Gestures.UWP
9 | {
10 | ///
11 | /// A multi-touch long-press gesture recognizer.
12 | ///
13 | public class LongPressRecognizer : PlatformLongPressRecognizer
14 | {
15 | ///
16 | /// Initializes a new instance of the class.
17 | ///
18 | /// The native view.
19 | /// Optional number of touches required.
20 | public LongPressRecognizer(FrameworkElement view, int numberOfTouchesRequired = Defaults.NumberofTouchesRequired) : base(view, numberOfTouchesRequired)
21 | {
22 | View.RightTapped += OnRightTapped;
23 | View.PointerPressed += OnPointerPressed;
24 | View.PointerReleased += OnPointerReleased;
25 | }
26 |
27 | ///
28 | public override void Dispose()
29 | {
30 | View.RightTapped -= OnRightTapped;
31 | View.PointerPressed -= OnPointerPressed;
32 | View.PointerReleased -= OnPointerReleased;
33 | }
34 |
35 | private void OnRightTapped(object sender, RightTappedRoutedEventArgs e) => OnLongPressed();
36 |
37 | private void OnPointerPressed(object sender, PointerRoutedEventArgs e)
38 | {
39 | var point = e.GetCurrentPoint(View);
40 | OnTouchesBegan(point.Position.X, point.Position.Y);
41 | }
42 |
43 | private void OnPointerReleased(object sender, PointerRoutedEventArgs e)
44 | {
45 | var point = e.GetCurrentPoint(View);
46 | OnTouchesEnded(point.Position.X, point.Position.Y);
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/src/Gestures.WPF/Listeners/KeyListener.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System.Windows;
6 | using System.Windows.Input;
7 |
8 | namespace Velocity.Gestures.WPF
9 | {
10 | ///
11 | /// A key interaction listener.
12 | ///
13 | public class KeyListener : PlatformKeyListener
14 | {
15 | ///
16 | /// Initializes a new instance of the class.
17 | ///
18 | /// The native view.
19 | public KeyListener(FrameworkElement view) : base(view)
20 | {
21 | Application.Current.MainWindow.KeyDown += OnKeyDown;
22 | Application.Current.MainWindow.KeyUp += OnKeyUp;
23 | }
24 |
25 | ///
26 | public override void Dispose()
27 | {
28 | Application.Current.MainWindow.KeyDown -= OnKeyDown;
29 | Application.Current.MainWindow.KeyUp -= OnKeyUp;
30 | }
31 |
32 | private void OnKeyDown(object sender, KeyEventArgs e) => OnKeyDown(e.Key.ToKey());
33 |
34 | private void OnKeyUp(object sender, KeyEventArgs e) => OnKeyUp(e.Key.ToKey());
35 | }
36 | }
--------------------------------------------------------------------------------
/src/Gestures.WPF/Properties/Settings.Designer.cs:
--------------------------------------------------------------------------------
1 | //------------------------------------------------------------------------------
2 | //
3 | // This code was generated by a tool.
4 | // Runtime Version:4.0.30319.42000
5 | //
6 | // Changes to this file may cause incorrect behavior and will be lost if
7 | // the code is regenerated.
8 | //
9 | //------------------------------------------------------------------------------
10 |
11 | namespace Velocity.Gestures.WPF.Properties {
12 |
13 |
14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.6.0.0")]
16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 |
18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
19 |
20 | public static Settings Default {
21 | get {
22 | return defaultInstance;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/src/Gestures.WPF/Properties/Settings.settings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
--------------------------------------------------------------------------------
/src/Gestures.WPF/Recognizers/HoverRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System.Windows;
6 | using System.Windows.Input;
7 |
8 | namespace Velocity.Gestures.WPF
9 | {
10 | ///
11 | /// A multi-touch hover gesture recognizer.
12 | ///
13 | public class HoverRecognizer : PlatformHoverRecognizer
14 | {
15 | ///
16 | /// Initializes a new instance of the class.
17 | ///
18 | /// The native view.
19 | public HoverRecognizer(FrameworkElement view) : base(view)
20 | {
21 | View.MouseEnter += OnMouseEnter;
22 | View.MouseLeave += OnMouseLeave;
23 | }
24 |
25 | ///
26 | public override void Dispose()
27 | {
28 | View.MouseEnter -= OnMouseEnter;
29 | View.MouseLeave -= OnMouseLeave;
30 | }
31 |
32 | private void OnMouseEnter(object sender, MouseEventArgs e)
33 | {
34 | var point = e.GetPosition(View);
35 |
36 | OnTouchesBegan(point.X, point.Y);
37 | OnHoveringStateChanged(GestureState.Began);
38 | }
39 |
40 | private void OnMouseLeave(object sender, MouseEventArgs e)
41 | {
42 | var point = e.GetPosition(View);
43 |
44 | OnHoveringStateChanged(GestureState.Ended);
45 | OnTouchesEnded(point.X, point.Y);
46 | }
47 | }
48 | }
--------------------------------------------------------------------------------
/src/Gestures.WPF/Recognizers/LongPressRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System.Windows;
6 | using System.Windows.Input;
7 |
8 | namespace Velocity.Gestures.WPF
9 | {
10 | ///
11 | /// A multi-touch long-press gesture recognizer.
12 | ///
13 | public class LongPressRecognizer : PlatformLongPressRecognizer
14 | {
15 | ///
16 | /// Initializes a new instance of the class.
17 | ///
18 | /// The native view.
19 | /// Optional number of touches required.
20 | public LongPressRecognizer(FrameworkElement view, int numberOfTouchesRequired = Defaults.NumberofTouchesRequired) : base(view, numberOfTouchesRequired)
21 | {
22 | View.MouseRightButtonDown += OnMouseRightButtonDown;
23 | View.MouseDown += OnMouseDown;
24 | View.MouseUp += OnMouseUp;
25 | }
26 |
27 | ///
28 | public override void Dispose()
29 | {
30 | View.MouseRightButtonDown -= OnMouseRightButtonDown;
31 | View.MouseDown -= OnMouseDown;
32 | View.MouseUp -= OnMouseUp;
33 | }
34 |
35 | private void OnMouseRightButtonDown(object sender, MouseButtonEventArgs e) => OnLongPressed();
36 |
37 | private void OnMouseDown(object sender, MouseButtonEventArgs e)
38 | {
39 | var point = e.GetPosition(View);
40 | OnTouchesBegan(point.X, point.Y);
41 | }
42 |
43 | private void OnMouseUp(object sender, MouseButtonEventArgs e)
44 | {
45 | var point = e.GetPosition(View);
46 | OnTouchesEnded(point.X, point.Y);
47 | }
48 | }
49 | }
--------------------------------------------------------------------------------
/src/Gestures.WPF/Themes/Generic.xaml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
--------------------------------------------------------------------------------
/src/Gestures.iOS/Extensions/UIKitEx.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using UIKit;
7 |
8 | namespace Velocity.Gestures.iOS
9 | {
10 | ///
11 | /// Extensions for .
12 | ///
13 | public static class UIKitEx
14 | {
15 | ///
16 | /// Convert to a .
17 | ///
18 | /// The .
19 | /// The .
20 | public static SwipeDirection ToSwipeDirection(this UISwipeGestureRecognizerDirection direction)
21 | {
22 | switch (direction)
23 | {
24 | case UISwipeGestureRecognizerDirection.Left:
25 | return SwipeDirection.Left;
26 |
27 | case UISwipeGestureRecognizerDirection.Right:
28 | return SwipeDirection.Right;
29 |
30 | case UISwipeGestureRecognizerDirection.Up:
31 | return SwipeDirection.Up;
32 |
33 | case UISwipeGestureRecognizerDirection.Down:
34 | return SwipeDirection.Down;
35 |
36 | default:
37 | throw new NotImplementedException();
38 | }
39 | }
40 | }
41 | }
--------------------------------------------------------------------------------
/src/Gestures/Defaults.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures
6 | {
7 | ///
8 | /// Defaults for platform recognizers.
9 | ///
10 | public struct Defaults
11 | {
12 | ///
13 | /// The default number of touches required.
14 | ///
15 | public const int NumberofTouchesRequired = 1;
16 |
17 | ///
18 | /// The default number of taps required.
19 | ///
20 | public const int NumberOfTapsRequired = 1;
21 |
22 | ///
23 | /// The default swipe direction mask.
24 | ///
25 | public const SwipeDirection DirectionMask = SwipeDirection.Any;
26 |
27 | ///
28 | /// The default swipe direction threshold.
29 | /// This is only used on platforms which use the swipe gesture algorithm.
30 | ///
31 | public const int Threshold = 100;
32 | }
33 | }
--------------------------------------------------------------------------------
/src/Gestures/Extensions/DisposableExtensions.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.Reactive.Disposables;
7 |
8 | namespace Velocity.Gestures
9 | {
10 | ///
11 | /// Extensions for .
12 | ///
13 | public static class DisposableExtensions
14 | {
15 | ///
16 | /// Register the for disposable with the .
17 | ///
18 | /// The object to dispose.
19 | /// The .
20 | public static void DisposeWith(this IDisposable disposable, CompositeDisposable compositeDisposable)
21 | {
22 | compositeDisposable.Add(disposable);
23 | }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Gestures/Gestures.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures
6 | {
7 | ///
8 | /// Cross-platform constants and utility methods for the gestures library.
9 | ///
10 | public class Gestures
11 | {
12 | }
13 | }
--------------------------------------------------------------------------------
/src/Gestures/Gestures.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netstandard2.0
5 | false
6 | ..\..\StyleCop.ruleset
7 | Velocity.Gestures
8 | Velocity.Gestures
9 |
10 |
11 |
12 |
13 | all
14 | runtime; build; native; contentfiles; analyzers; buildtransitive
15 |
16 |
17 |
18 |
19 |
20 |
21 | SolutionInfo.cs
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
--------------------------------------------------------------------------------
/src/Gestures/IViewAttachment.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures
8 | {
9 | ///
10 | /// A platform view attachment.
11 | ///
12 | /// The native view.
13 | public interface IViewAttachment : IDisposable where TView : class
14 | {
15 | ///
16 | /// Gets the view.
17 | ///
18 | TView View { get; }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Gestures/Listeners/IKeyListener.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures
8 | {
9 | ///
10 | /// A key interaction listener.
11 | ///
12 | /// The native view.
13 | public interface IKeyListener : IViewAttachment where TView : class
14 | {
15 | ///
16 | /// Gets the key(s) pressed observable.
17 | ///
18 | IObservable Pressed { get; }
19 |
20 | ///
21 | /// Gets the key down observable.
22 | ///
23 | IObservable KeyDown { get; }
24 |
25 | ///
26 | /// Gets the key up observable.
27 | ///
28 | IObservable KeyUp { get; }
29 | }
30 | }
--------------------------------------------------------------------------------
/src/Gestures/Listeners/IPlatformListener.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures
8 | {
9 | ///
10 | /// An interaction listener.
11 | ///
12 | /// The native view.
13 | public interface IPlatformListener : IViewAttachment where TView : class
14 | {
15 | }
16 | }
--------------------------------------------------------------------------------
/src/Gestures/Listeners/PlatformListener.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.ComponentModel;
7 |
8 | namespace Velocity.Gestures
9 | {
10 | ///
11 | /// An interaction listener.
12 | ///
13 | /// The native view.
14 | [EditorBrowsable(EditorBrowsableState.Never)]
15 | public abstract class PlatformListener : IPlatformListener where TView : class
16 | {
17 | ///
18 | /// Initializes a new instance of the class.
19 | ///
20 | /// The native view.
21 | protected PlatformListener(TView view)
22 | {
23 | View = view ?? throw new ArgumentNullException(nameof(view));
24 | }
25 |
26 | ///
27 | public TView View { get; }
28 |
29 | ///
30 | public abstract void Dispose();
31 | }
32 | }
--------------------------------------------------------------------------------
/src/Gestures/Models/GestureState.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures
6 | {
7 | ///
8 | /// The gesture state.
9 | ///
10 | public enum GestureState
11 | {
12 | ///
13 | /// Geture began.
14 | ///
15 | Began,
16 |
17 | ///
18 | /// Gesture changed.
19 | ///
20 | Changed,
21 |
22 | ///
23 | /// Gesture ended.
24 | ///
25 | Ended,
26 |
27 | ///
28 | /// Gesture cancelled.
29 | ///
30 | Cancelled,
31 |
32 | ///
33 | /// Gestured failed.
34 | ///
35 | Failed
36 | }
37 | }
--------------------------------------------------------------------------------
/src/Gestures/Models/HoverEvent.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures
6 | {
7 | ///
8 | /// A hover event raised by the .
9 | ///
10 | public sealed class HoverEvent
11 | {
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The gesture state.
16 | internal HoverEvent(GestureState state)
17 | {
18 | State = state;
19 | }
20 |
21 | ///
22 | /// Gets the gesture state.
23 | ///
24 | public GestureState State { get; }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Gestures/Models/PanEvent.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures
6 | {
7 | ///
8 | /// A pan event raised by the .
9 | ///
10 | public sealed class PanEvent
11 | {
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The gesture state.
16 | internal PanEvent(GestureState state)
17 | {
18 | State = state;
19 | }
20 |
21 | ///
22 | /// Initializes a new instance of the class.
23 | ///
24 | /// The translation along the X-axis.
25 | /// The translation along the Y-axis.
26 | internal PanEvent(double totalX, double totalY)
27 | {
28 | State = GestureState.Changed;
29 | TotalX = totalX;
30 | TotalY = totalY;
31 | }
32 |
33 | ///
34 | /// Gets the gesture state.
35 | ///
36 | public GestureState State { get; }
37 |
38 | ///
39 | /// Gets the translation along the X-axis
40 | ///
41 | public double TotalX { get; }
42 |
43 | ///
44 | /// Gets the translation along the Y-axis.
45 | ///
46 | public double TotalY { get; }
47 | }
48 | }
--------------------------------------------------------------------------------
/src/Gestures/Models/PinchEvent.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures
6 | {
7 | ///
8 | /// A pinch event raised by the .
9 | ///
10 | public sealed class PinchEvent
11 | {
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The X-coordinate.
16 | /// The Y-coordinate.
17 | internal PinchEvent(double x, double y)
18 | {
19 | State = GestureState.Began;
20 | Origin = new Point(x, y);
21 | }
22 |
23 | ///
24 | /// Initializes a new instance of the class.
25 | ///
26 | /// The pinch scale.
27 | internal PinchEvent(double scale)
28 | {
29 | State = GestureState.Changed;
30 | Scale = scale;
31 | }
32 |
33 | ///
34 | /// Initializes a new instance of the class.
35 | ///
36 | /// The gesture state.
37 | internal PinchEvent(GestureState state)
38 | {
39 | State = state;
40 | }
41 |
42 | ///
43 | /// Gets the gesture state.
44 | ///
45 | public GestureState State { get; }
46 |
47 | ///
48 | /// Gets the pinch scale.
49 | ///
50 | public double Scale { get; }
51 |
52 | ///
53 | /// Gets the pinch origin.
54 | ///
55 | public Point Origin { get; }
56 | }
57 | }
--------------------------------------------------------------------------------
/src/Gestures/Models/Point.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | namespace Velocity.Gestures
6 | {
7 | ///
8 | /// A point relative to the coordinate system of the native view.
9 | ///
10 | public sealed class Point
11 | {
12 | ///
13 | /// Initializes a new instance of the class.
14 | ///
15 | /// The X-coordinate.
16 | /// The Y-coordinate.
17 | internal Point(double x, double y)
18 | {
19 | X = x;
20 | Y = y;
21 | }
22 |
23 | ///
24 | /// Gets the X-coordinate.
25 | ///
26 | public double X { get; }
27 |
28 | ///
29 | /// Gets the Y-coordinate.
30 | ///
31 | public double Y { get; }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/src/Gestures/Models/SwipeDirection.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures
8 | {
9 | ///
10 | /// The swipe direction.
11 | ///
12 | [Flags]
13 | public enum SwipeDirection
14 | {
15 | ///
16 | /// Swipe left.
17 | ///
18 | Left = 1,
19 |
20 | ///
21 | /// Swipe right.
22 | ///
23 | Right = 2,
24 |
25 | ///
26 | /// Swipe up.
27 | ///
28 | Up = 4,
29 |
30 | ///
31 | /// Swipe down.
32 | ///
33 | Down = 8,
34 |
35 | ///
36 | /// Swipe in any direction.
37 | ///
38 | Any = Left | Right | Up | Down
39 | }
40 | }
--------------------------------------------------------------------------------
/src/Gestures/Recognizers/IHoverRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures
8 | {
9 | ///
10 | /// A multi-touch hover gesture recognizer.
11 | ///
12 | /// The native view.
13 | public interface IHoverRecognizer : IPlatformRecognizer where TView : class
14 | {
15 | ///
16 | /// Gets the hovering observable.
17 | ///
18 | IObservable Hovering { get; }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Gestures/Recognizers/ILongPressRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.Reactive;
7 |
8 | namespace Velocity.Gestures
9 | {
10 | ///
11 | /// A multi-touch long-press gesture recognizer.
12 | ///
13 | /// The native view.
14 | public interface ILongPressRecognizer : IPlatformRecognizer where TView : class
15 | {
16 | ///
17 | /// Gets the long-pressed observable.
18 | ///
19 | IObservable LongPressed { get; }
20 | }
21 | }
--------------------------------------------------------------------------------
/src/Gestures/Recognizers/IPanRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures
8 | {
9 | ///
10 | /// A multi-touch pan gesture recognizer.
11 | ///
12 | /// The native view.
13 | public interface IPanRecognizer : IPlatformRecognizer where TView : class
14 | {
15 | ///
16 | /// Gets the panning observable.
17 | ///
18 | IObservable Panning { get; }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Gestures/Recognizers/IPinchRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures
8 | {
9 | ///
10 | /// A multi-touch pinch gesture recognizer.
11 | ///
12 | /// The native view.
13 | public interface IPinchRecognizer : IPlatformRecognizer where TView : class
14 | {
15 | ///
16 | /// Gets the pinching observable.
17 | ///
18 | IObservable Pinching { get; }
19 | }
20 | }
--------------------------------------------------------------------------------
/src/Gestures/Recognizers/IPlatformRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures
8 | {
9 | ///
10 | /// A multi-touch gesture recognizer.
11 | ///
12 | /// The native view.
13 | public interface IPlatformRecognizer : IViewAttachment where TView : class
14 | {
15 | ///
16 | /// Gets the number of touches required.
17 | ///
18 | int NumberOfTouchesRequired { get; }
19 |
20 | ///
21 | /// Gets the touches began observable.
22 | ///
23 | IObservable TouchesBegan { get; }
24 |
25 | ///
26 | /// Gets the touches ended observable.
27 | ///
28 | IObservable TouchesEnded { get; }
29 | }
30 | }
--------------------------------------------------------------------------------
/src/Gestures/Recognizers/ISwipeRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 |
7 | namespace Velocity.Gestures
8 | {
9 | ///
10 | /// A multi-touch swipe gesture recognizer.
11 | ///
12 | /// The native view.
13 | public interface ISwipeRecognizer : IPlatformRecognizer where TView : class
14 | {
15 | ///
16 | /// Gets the swipe direction mask.
17 | ///
18 | SwipeDirection DirectionMask { get; }
19 |
20 | ///
21 | /// Gets the swiped observable.
22 | ///
23 | IObservable Swiped { get; }
24 | }
25 | }
--------------------------------------------------------------------------------
/src/Gestures/Recognizers/ITapRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.Reactive;
7 |
8 | namespace Velocity.Gestures
9 | {
10 | ///
11 | /// A multi-touch tap gesture recognizer.
12 | ///
13 | /// The native view.
14 | public interface ITapRecognizer : IPlatformRecognizer where TView : class
15 | {
16 | ///
17 | /// Gets the number of taps required.
18 | ///
19 | int NumberOfTapsRequired { get; }
20 |
21 | ///
22 | /// Gets the tapped observable.
23 | ///
24 | IObservable Tapped { get; }
25 | }
26 | }
--------------------------------------------------------------------------------
/src/Gestures/Recognizers/PlatformHoverRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.ComponentModel;
7 | using System.Reactive.Linq;
8 | using System.Reactive.Subjects;
9 |
10 | namespace Velocity.Gestures
11 | {
12 | ///
13 | /// A multi-touch hover gesture recognizer.
14 | ///
15 | /// The native view.
16 | [EditorBrowsable(EditorBrowsableState.Never)]
17 | public abstract class PlatformHoverRecognizer : PlatformRecognizer, IHoverRecognizer where TView : class
18 | {
19 | private readonly Subject _hoveringSubject;
20 |
21 | ///
22 | /// Initializes a new instance of the class.
23 | ///
24 | /// The native view.
25 | protected PlatformHoverRecognizer(TView view) : base(view, 1)
26 | {
27 | _hoveringSubject = new Subject();
28 | Hovering = _hoveringSubject.AsObservable();
29 | }
30 |
31 | ///
32 | public IObservable Hovering { get; }
33 |
34 | ///
35 | /// Call when hovering state has changed.
36 | ///
37 | /// The gesture state.
38 | protected void OnHoveringStateChanged(GestureState state) => _hoveringSubject.OnNext(new HoverEvent(state));
39 | }
40 | }
--------------------------------------------------------------------------------
/src/Gestures/Recognizers/PlatformLongPressRecognizer.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using System.ComponentModel;
7 | using System.Reactive;
8 | using System.Reactive.Linq;
9 | using System.Reactive.Subjects;
10 |
11 | namespace Velocity.Gestures
12 | {
13 | ///
14 | /// A multi-touch long-press gesture recognizer.
15 | ///
16 | /// The native view.
17 | [EditorBrowsable(EditorBrowsableState.Never)]
18 | public abstract class PlatformLongPressRecognizer : PlatformRecognizer, ILongPressRecognizer where TView : class
19 | {
20 | private readonly Subject _longPressedSubject;
21 |
22 | ///
23 | /// Initializes a new instance of the class.
24 | ///
25 | /// The native view.
26 | /// The number of touches required.
27 | protected PlatformLongPressRecognizer(TView view, int numberOfTouchesRequired) : base(view, numberOfTouchesRequired)
28 | {
29 | _longPressedSubject = new Subject();
30 | LongPressed = _longPressedSubject.AsObservable();
31 | }
32 |
33 | ///
34 | public IObservable LongPressed { get; }
35 |
36 | ///
37 | /// Call when long-pressed.
38 | ///
39 | protected void OnLongPressed() => _longPressedSubject.OnNext(Unit.Default);
40 | }
41 | }
--------------------------------------------------------------------------------
/tests/Gestures.Tests/Gestures.Tests.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp3.1
5 | false
6 | ..\..\StyleCop.ruleset
7 | false
8 | Velocity.Gestures.Tests
9 | Velocity.Gestures.Tests
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 | all
18 | runtime; build; native; contentfiles; analyzers; buildtransitive
19 |
20 |
21 |
22 | all
23 | runtime; build; native; contentfiles; analyzers; buildtransitive
24 |
25 |
26 | all
27 | runtime; build; native; contentfiles; analyzers; buildtransitive
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
--------------------------------------------------------------------------------
/tests/Gestures.Tests/Listeners/PlatformListener_Tests.cs:
--------------------------------------------------------------------------------
1 | //
2 | // Copyright (c) 2020 Velocity Systems
3 | //
4 |
5 | using System;
6 | using Xunit;
7 |
8 | namespace Velocity.Gestures.Tests
9 | {
10 | ///
11 | /// Tests the implementation of .
12 | ///
13 | public class PlatformListener_Tests
14 | {
15 | ///
16 | /// Tests that the constructor throws an when the view is null.
17 | ///
18 | [Fact]
19 | public void Ctor_throws_exception_when_view_is_null()
20 | {
21 | Assert.Throws(() => new PlatformListenerStub(default));
22 | }
23 |
24 | ///
25 | /// Tests that the constructor sets the property when the view is valid.
26 | ///
27 | [Fact]
28 | public void Ctor_sets_View_property_when_view_is_valid()
29 | {
30 | var view = new object();
31 | Assert.Same(view, new PlatformListenerStub(view).View);
32 | }
33 |
34 | private class PlatformListenerStub : PlatformListener