Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 58056

Animations from a ViewModel

$
0
0

I'm trying to make animation on a View through its ViewModel, but it doesn't working somehow. If call explicitly an animation in the View, it works but not from the attached ViewModel. Right now I resolve the control from the Autofac's componentcontext which is a single instance.

The code looks like this:

Device.BeginInvokeOnMainThread(async () =>
    {
        var internetConnectionView = componentContext.Resolve<InternetConnectionControl>();
        await internetConnectionView.FadeTo(0, 2000, Easing.Linear);
        await internetConnectionView.FadeTo(1, 2000, Easing.Linear);
        await internetConnectionView.FadeTo(0, 2000, Easing.Linear);
    });

What can be the problem?


Viewing all articles
Browse latest Browse all 58056

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>