rotorgames / Rg.Plugins.Popup

Xamarin Forms popup plugin
MIT License
1.15k stars 337 forks source link

Non-XAML example? #454

Open BillFulton opened 5 years ago

BillFulton commented 5 years ago

Would really appreciate a small code example including animation, without using XAML. Am struggling to convert my working XAML page to code-only. I am guessing animation code would be like this but not sure where to put it:

scaleAnimation = new ScaleAnimation (); scaleAnimation.PositionIn = Rg.Plugins.Popup.Enums.MoveAnimationOptions.Center; scaleAnimation.PositionOut = Rg.Plugins.Popup.Enums.MoveAnimationOptions.Center; scaleAnimation.ScaleIn = 1.2D; scaleAnimation.ScaleOut = 0.8D; scaleAnimation.DurationIn = 400; scaleAnimation.DurationOut = 300; scaleAnimation.EasingIn = Easing.SinOut; scaleAnimation.EasingOut = Easing.SinIn; scaleAnimation.HasBackgroundAnimation = true; Animation = scaleAnimation;

With or without this code, a small popup appears and instantly shrinks to a point (Xamarin Forms / iOS).

Huge thanks for this Nuget, it's amazing.

-- Bill

LuckyDucko commented 2 years ago

@BillFulton

Long time in response, in the .Net MAUI version of this, the plan is to atleast have CsharpMarkup and Xaml