Beispiel #1
0
        protected async Task ShakeGlass(CancellationToken cancellationToken)
        {
            while (!cancellationToken.IsCancellationRequested)
            {
                AnimateOnMain(async() =>
                {
                    var t1 = glassHereContainer.TranslateTo(0, -30, 220);
                    var t2 = glassHereContainer.RotateTo(-3, 220);
                    await Task.WhenAll(t1, t2);

                    await Task.Delay(60);

                    await glassHereContainer.TranslateTo(0, 0, 220);
                    await glassHereContainer.RotateTo(0, 150);
                });

                await Task.Delay(3000, cancellationToken);
            }
        }