All Projects → AndreiMisiukevich → Toucheffect

AndreiMisiukevich / Toucheffect

Licence: mit
UI-responsive touch effects for Xamarin.Forms

Projects that are alternatives of or similar to Toucheffect

Xfx.controls
Xamarin Forms Extended Controls
Stars: ✭ 187 (-3.11%)
Mutual labels:  xamarin, xamarin-forms
Improvexamarinbuildtimes
Tips and tricks on how to speed up the time it takes to compile a Xamarin app
Stars: ✭ 180 (-6.74%)
Mutual labels:  xamarin, xamarin-forms
Plugin.audiorecorder
Audio Recorder plugin for Xamarin and Windows
Stars: ✭ 140 (-27.46%)
Mutual labels:  xamarin, xamarin-forms
Xamarin Forms Goodlooking Ui
Xamarin.Forms goodlooking UI samples
Stars: ✭ 2,300 (+1091.71%)
Mutual labels:  xamarin, xamarin-forms
Xamarin Playground
Random cool stuff I play around using Xamarin.. :3 Some of these cool projects I feature them on my blog, with step by step explanation. :) Don't forget to check it out. Go to: theconfuzedsourcecode.wordpress.com
Stars: ✭ 183 (-5.18%)
Mutual labels:  xamarin, xamarin-forms
Chameleon
Chameleon is a flexible media player build with Xamarin.Forms
Stars: ✭ 137 (-29.02%)
Mutual labels:  xamarin, xamarin-forms
Xamarin Forms Carouselview
A Xamarin.Forms custom control recipe that mirrors the functionality of the CarouselPage - except the "pages" are simply Content Views.
Stars: ✭ 147 (-23.83%)
Mutual labels:  xamarin, xamarin-forms
Arcgis Toolkit Dotnet
Toolkit for ArcGIS Runtime SDK for .NET
Stars: ✭ 125 (-35.23%)
Mutual labels:  xamarin, xamarin-forms
Xamarines
🕹️📱Cross-Platform Nintendo Emulator using Xamarin and .Net Standard!
Stars: ✭ 153 (-20.73%)
Mutual labels:  xamarin, xamarin-forms
Graphicscontrols
Experimental GraphicsControls - Build drawn controls (Cupertino, Fluent and Material)
Stars: ✭ 149 (-22.8%)
Mutual labels:  xamarin, xamarin-forms
Denunciado
This project born from the need from people to have a way of communication between municipalities and communities. Some municipalities, have their platforms, but they are complex to validate the veracity of complaints. Denounced, it was born with the purpose of offering a free platform to these municipalities. Denounced consists of three main modules developed with Microsoft technologies, using the .Net Framework and Xamarin for its development: 1. Back End Web Project: Module of administration of the complaints, by the employees of the town councils. In this tool, the employees of the city council receive, validate, report and close the complaints, after being served. 2. Web Portal Client: It consists of a web project, so that the community make their complaints, in the same, the users of the service create a profile, must specify when making their complaint, evidence to support this. Through the portal, they can see the complaints of other community members, follow it, give their opinion or provide possible solutions or more evidence. 3. Mobile Project: It has the same functionalities as the web portal, with the addition, that the automatic location can be sent, from the cell phone.
Stars: ✭ 183 (-5.18%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms.mocks
Library for running Xamarin.Forms inside of unit tests
Stars: ✭ 179 (-7.25%)
Mutual labels:  xamarin, xamarin-forms
Xamarin Docs
Xamarin Documentation - public content repo
Stars: ✭ 136 (-29.53%)
Mutual labels:  xamarin, xamarin-forms
Expandableview
Expandable view for Xamarin.Forms
Stars: ✭ 178 (-7.77%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms.breadcrumb
This is a breadcrumb navigation control that is complete automatic and uses the Navigation stack and page titles to generate the breadcrumbs.
Stars: ✭ 130 (-32.64%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.forms.videoplayer
A Xamarin Forms control to render the native video player on every platform.
Stars: ✭ 140 (-27.46%)
Mutual labels:  xamarin, xamarin-forms
Crossplatformdisktest
Windows, macOS and Android storage (HDD, SSD, RAM) speed testing/performance benchmarking app
Stars: ✭ 123 (-36.27%)
Mutual labels:  xamarin, xamarin-forms
Plugin.localnotification
The local notification plugin provides a way to show local notifications from Xamarin Forms apps .
Stars: ✭ 124 (-35.75%)
Mutual labels:  xamarin, xamarin-forms
Simpleauth
The Simplest way to Authenticate and make Rest API calls in .Net
Stars: ✭ 148 (-23.32%)
Mutual labels:  xamarin, xamarin-forms
Xamarin.plugin.calendar
Calendar plugin for Xamarin.Forms
Stars: ✭ 159 (-17.62%)
Mutual labels:  xamarin, xamarin-forms

TouchEffect was merged into XamarinCommunityToolkit https://github.com/xamarin/XamarinCommunityToolkit/pull/566 I highly recommed to use TouchEffect from XCT

TouchEff effect for Xamarin Forms (Repsonisve touches without TapGestureRecognizer)

This plugin provides opportunity to create views with touch effects without using TapGestureRecognizer. It makes it possible to change the appearance of any control in response to touch events, either directly via xaml or with your custom logic hooked up to the events which this plugin exposes.

With this plugin it is also possible to respond to hover events (if the platform exposes them) and to display native touch feedback events (Tilt on UWP, Ripple on Android, Opacity/Color changing on iOS).

Build Status

  • Azure DevOps: Build status

GIF

TouchImage Fade / Ripple Background color / Transformations IsToggled / image

Setup

  • Available on NuGet: TouchView NuGet
  • Add nuget package to your Xamarin.Forms .netStandard/PCL project and to your platform-specific projects (iOS and Android)
  • Add TouchEffectPreserver.Preserve() line to your AppDelegate and MainActivity (preserve from linker)
Platform Version
Xamarin.iOS 8.0+
Xamarin.Android 15+
Xamarin.Mac All
Xamarin.UWP 10+
Tizen.NET 4.0+
Xamarin.UWP - Build on Release with .NET Native tool chain note
using System.Reflection;
...
var assembliesToInclude = new List<Assembly>
{
    typeof(PlatformTouchEff).GetTypeInfo().Assembly,
    ...
};
Xamarin.Forms.Forms.Init(e, assembliesToInclude);

TouchEffectPreserver.Preserve();

Samples

The samples you can find here https://github.com/AndreiMisiukevich/TouchEffect/tree/master/TouchEffectSample

XAML: use TouchEff for achieving repsonsive UI (Changing background image or/and background color or/and opacity or/and scale).

Use TouchEff attached properties for setting up touch visual effect.

...
  xmlns:touch="clr-namespace:TouchEffect;assembly=TouchEffect"
...
       <ContentView
            touch:TouchEff.PressedAnimationDuration="800"
            touch:TouchEff.RegularAnimationDuration="800"
            touch:TouchEff.PressedScale="0.9"
            touch:TouchEff.PressedOpacity="0.6"
            touch:TouchEff.RippleCount="-1"
            touch:TouchEff.Command="{Binding Command}">
            
            Padding="10, 5"
            BackgroundColor="Black"
            VerticalOptions="CenterAndExpand"
            HorizontalOptions="CenterAndExpand">
            
            <Label Text="CLICK ME" 
                   TextColor="White" 
                   FontSize="60"/>
            
        </ContentView>
...
       <StackLayout
            touch:TouchEff.RegularBackgroundColor="Green"
            touch:TouchEff.PressedBackgroundColor="Red"
            touch:TouchEff.PressedScale="1.2"
            touch:TouchEff.RippleCount="1"
            touch:TouchEff.PressedRotation="10"
            touch:TouchEff.PressedRotationX="15"
            touch:TouchEff.PressedRotationY="15"
            touch:TouchEff.PressedTranslationX="5"
            touch:TouchEff.PressedTranslationY="5"
            touch:TouchEff.PressedAnimationDuration="500"
            touch:TouchEff.RegularAnimationDuration="500"
            touch:TouchEff.Command="{Binding Command}">

            Padding="10, 5"
            VerticalOptions="CenterAndExpand"
            HorizontalOptions="CenterAndExpand">

            <Label Text="CLICK ME" 
                   TextColor="Black" 
                   FontSize="60"/>
        </StackLayout>

If you wish to change Image Source on touch, you should use TouchImage control. It has several bindable properties for managing Pressed/Regular Source/Aspect of the image.

...
  xmlns:touch="clr-namespace:TouchEffect;assembly=TouchEffect"
...
       <touch:TouchImage
            VerticalOptions="CenterAndExpand"
            HorizontalOptions="CenterAndExpand"
            HeightRequest="250"
            WidthRequest="250"
            RegularBackgroundImageSource="button"
            PressedBackgroundImageSource="button_pressed"
            touch:TouchEff.Command="{Binding Command}"
            />

TouchEff Attached Properties

Property Type Default Description
IsAvailable bool true Makes effect available
ShouldMakeChildrenInputTransparent bool true Makes layout's children input trasparent
Command ICommand null Touch Command handler
CommandParameter object null Touch Command handler parameter
Status TouchStatus Completed Current touch status
State TouchState Regular Current touch state
RegularBackgroundColor Color Default Background color of regular state
PressedBackgroundColor Color Default Background color of pressed state
HoveredBackgroundColor Color Default Background color of hovered state
RegularOpacity double 1.0 Opacity of regular state
PressedOpacity double 1.0 Opacity of pressed state
HoveredOpacity double 1.0 Opacity of hovered state
RegularScale double 1.0 Scale of regular state
PressedScale double 1.0 Scale of pressed state
HoveredScale double 1.0 Scale of hovered state
RegularTranslationX double 0.0 TranslationX of regular state
PressedTranslationX double 0.0 TranslationX of pressed state
HoveredTranslationX double 0.0 TranslationX of hovered state
RegularTranslationY double 0.0 TranslationY of regular state
PressedTranslationY double 0.0 TranslationY of pressed state
HoveredTranslationY double 0.0 TranslationY of hovered state
RegularRotation double 0.0 Rotation of regular state
PressedRotation double 0.0 Rotation of pressed state
HoveredRotation double 0.0 Rotation of hovered state
RegularRotationX double 0.0 RotationX of regular state
PressedRotationX double 0.0 RotationX of pressed state
HoveredRotationX double 0.0 RotationX of hovered state
RegularRotationY double 0.0 RotationY of regular state
PressedRotationY double 0.0 RotationY of pressed state
HoveredRotationY double 0.0 RotationY of hovered state
AnimationDuration int 0 The common duration of animation
AnimationEasing Easing null The common easing of animation
PressedAnimationDuration int 0 The duration of animation by applying PressedOpacity and/or PressedBackgroundColor and/or PressedScale
PressedAnimationEasing Easing null The easing of animation by applying PressedOpacity and/or PressedBackgroundColor and/or PressedScale
HoveredAnimationDuration int 0 The duration of animation by applying HoveredOpacity and/or HoveredBackgroundColor and/or HoveredScale
HoveredAnimationEasing Easing null The easing of animation by applying HoveredOpacity and/or HoveredBackgroundColor and/or HoveredScale
RegularAnimationDuration int 0 The duration of animation by applying RegularOpacity and/or RegularBackgroundColor and/or RegularScale
RegularAnimationEasing Easing null The easing of animation by applying RegularOpacity and/or RegularBackgroundColor and/or RegularScale
RippleCount int 0 This property allows to set ripple of animation (Pressed/Hovered/Regular animation loop). '0: disabled'; '-1: infinite loop'; '1, 2, 3 ... n: Ripple's interations'
IsToggled bool? null This property allows to achieve "switch" behavior. null means that feature is disabled and view will return to inital state after touch releasing
DisallowTouchThreshold int 0 Movement threshold for considering android touch as canceled
NativeAnimation bool false If native platform touch feedback animations are present (Tilt on UWP, Ripple on Android, Opacity/Color on iOS)
NativeAnimationColor Color Color.Default The color used for the native touch feedback animation
NativeAnimationRadius int -1 The radius of the native ripple animation on Android or Layer radius on iOS

TouchEff Attached events

Event Type Default Description
StatusChanged TEffectStatusChangedHandler null Touch status changed
StateChanged TEffectStateChangedHandler null Touch state changed
HoverStatusChanged TEffectHoverStatusChangedHandler null Hover status changed
HoverStateChanged TEffectHoverStateChangedHandler null Hover state changed
Completed TEffectCompletedHandler null User tapped
AnimationStarted AnimationStartedHandler null Animation started

TouchImage Bindable Properties

Property Type Default Description
RegularBackgroundImageSource ImageSource null Background image source of regular state
PressedBackgroundImageSource ImageSource null Background image source of pressed state
HoveredBackgroundImageSource ImageSource null Background image source of hovered state
RegularBackgroundImageAspect Aspect AspectFit Background image aspect of regular state
PressedBackgroundImageAspect Aspect AspectFit Background image aspect of pressed state
HoveredBackgroundImageAspect Aspect AspectFit Background image aspect of hovered state

If you want to customize/extend existing controls, you may observe State property via triggers

Check source code for more info, or just ask me =)

License

The MIT License (MIT) see License file

Contribution

Feel free to create issues and PRs 😃

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].