Hi all, let me introduce new plugin for Xamarin.Forms development.
https://github.com/AndreiMisiukevich/TouchEffect
This plugin allows developers to create UI-responsive controls/layouts with touch effect (fade control, change image source, change background color)
I will appreciate any feedback)
Posts
nuget: https://www.nuget.org/packages/TouchView
Any feedback?)
up.
https://github.com/AndreiMisiukevich/TouchEffect
Updated documentation. Refactored code.
Use TouchView now (All necessary properties are compiled in one view!)
Responsive UI in xamarin forms - easy.
On touch you can change:
Background image
Background color (animated or not)
Opacity (animated or not)
Scale (animated or not)
Ripple animation is supported
https://github.com/AndreiMisiukevich/TouchEffect
I'm going to try it out today.
I have my own solution for this but i'm not satisfied. Your control seem flexible and functional
@GiampaoloGabba thank you
wait your feedback
@GiampaoloGabba was it good?
I'm going to add Translation (X/Y) and Rotation (Regular, X, Y) support
Added couple of new properties
More info here: https://github.com/AndreiMisiukevich/TouchEffect/releases
@GiampaoloGabba have you tried it yet?)
up
new release
bugfixes
https://github.com/AndreiMisiukevich/TouchEffect
Created TouchEff
So, you may use it as Effect (check Readme for more info)
New release: more on github
https://github.com/AndreiMisiukevich/TouchEffect
iOS, Android, UWP, Mac supported
Will it work for child controls too? I have a StackLayout at some level of ContentPage's content. In this StackLayout, there are number of controls. I want to bind separate touch commands to respective controls. Is it supported?
I am trying this, but seems like to be not working.
Update: I had to add the Control.Effect too. Only binding the command wouldn't work. For example:
<Image Source="{imgExt:ImageResource ic_add_dark.png}" Style="{x:StaticResource SideMenuImageButton}" touch:TouchEff.PressedAnimationDuration="800" touch:TouchEff.RegularAnimationDuration="800" touch:TouchEff.PressedOpacity="0.6" touch:TouchEff.RippleCount="1" touch:TouchEff.Command="{Binding AddTimerCommand}"> <Image.Effects> <touch:TouchEff /> </Image.Effects> </Image>
I was missing this part:
<Image.Effects> <touch:TouchEff /> </Image.Effects>
@M0Bilal so, does it work for you now?
If not, could you please provide small sample project, i will help you?
Yes it's working now as it should. Thanks a lot.
Apart from above, I was trying to implement touch effects on a Frame. It was not working. I had to add a StackLayout inside frame and then I applied touch effects on StackLayout and it worked. Is it known? Or should it work on Frame too?
@M0Bilal it's XF bug, which already fixed by my PR
https://github.com/xamarin/Xamarin.Forms/pull/6412
Just wait until it become available in newer versions and update XF
Oh, My bad for being outdated.
Thanks a lot!
Hover detecting
I am really impressed by this and going to implement it in my whole project.
You can check samples on my github)
@AndreiMisiukevich_ I've strange issue, same TouchEffect code works fine in iOS, but doesn't on Android. I'm using TouchEffect inside DevExpress grid to imitate cell select. Effect itself works fine in both Android and iOS, but on Android grid RowTapCommand is not executed if I've TouchEffect.
This is XAML code of the grid:
If I remove touchEffect code then RowTapCommand works fine in Android.
@ErnestJ you can work around it. Use touch:TouchEffect.Command instead of RowTapCommand (Just make a proper binding)
@AndreiMisiukevich_ this was the first thing I did, but still not working
I used exactly same binding as for the grid:
touch:TouchEffect.Command = "{Binding RowTapCommand}"
touch:TouchEffect.Command = "{Binding BindingContext.RowTapCommand, Source={x:Reference GridView}}"
@ErnestJ
@AndreiMisiukevich_ Thank you so much, tap command now works perfectly!