michaeled / FormsPopup

Xamarin.Forms Popup View
MIT License
75 stars 22 forks source link

Animating popup closing #3

Closed robmpreston closed 9 years ago

robmpreston commented 9 years ago

Hey,

I have a popup that slides up from the bottom of the screen. The animation works fine for when it opens, but im not sure how to get it to work when it closes?

This is the code I have:

        closeButton.Clicked += async (s,e) => {
            double original;

            await _popup.HideAsync(async p => 
                {
                    await Task.WhenAll
                    (
                        p.SectionContainer.TranslateTo(0, 250, 250)
                    );
                });
        };

But when I click to close it just instantly closes without sliding offscreen first.

michaeled commented 9 years ago

I've fixed and commited the change. Go ahead and get latest.

robmpreston commented 9 years ago

working perfectly, thanks. thought i was doing something wrong :)