Trigger for when whole object is visible

Hello,
I’m using the WhileVisibleInScrollView tag to trigger some animations. However, I want to make it so that the trigger activates when the entire object is visible in the ScrollView, right now the animation is triggered when any part of the object is visible in the ScrollView. Is this possible?

Thanks

Hi,

the Distance property allows a bit of customisation, but seems that it won’t do exactly what you’re after. I suggest you take a look at WhileVisibleInScrollView implementation, and build a similar trigger that takes into account the height of the particular element.

Hope this helps!

I see, are you suggesting that I build something similar to WhileVisibleInScrollView in Uno? Can you point me in the direction of a how-to or tutorial that can show me how to do this?

Thanks!

Yes, that is exactly what I’m suggesting. Either building a new trigger, or extending WhileVisibleInScrollView so that it does what you need it to do.

The Native Interop section and its subsections should get you started. Looking at the existing code in fuselibs-public will help a lot too; I’m fairly certain there are other triggers that access the dimensions of a visual.

Hi Zia,

good news! We have now implemented a Mode property on WhileVisibleInScrollView that can be either Partial (default) which works just as it did before, and Full which works as you would expect it to.

This has been merged to fuselibs-public/master now, so you can get it with a local checkout of fuselibs: https://github.com/fusetools/fuselibs-public/pull/178

There are no details on which future release of Fuse will have this in the libs bundled with the installer, so if you need it, I suggest you get that local checkout working.

Amazing, thank you so much. I will have a play around.