public CustomGeneralPopupView(View inputView) { Content = inputView; PageClosingTaskCompletionSource = new TaskCompletionSource <T>(); if (!string.IsNullOrWhiteSpace(Content.AutomationId) && Content.AutomationId.Contains("Popup")) { var moveAnimation = new Rg.Plugins.Popup.Animations.MoveAnimation { PositionIn = Rg.Plugins.Popup.Enums.MoveAnimationOptions.Bottom, PositionOut = Rg.Plugins.Popup.Enums.MoveAnimationOptions.Bottom, HasBackgroundAnimation = true, DurationIn = 200, DurationOut = 400 }; this.Animation = moveAnimation; this.BackgroundColor = new Color(0, 0, 0, 0.4); } else { this.BackgroundColor = new Color(0, 0, 0, 0.5); } }
/// <summary> /// /// </summary> /// <param name="title">popup title</param> /// <param name="options">Action, button text, button color, text color, option border color</param> public CustomActionSheets(string title, Tuple <Command, string, Color, Color, Color>[] options) { Animation = new Rg.Plugins.Popup.Animations.MoveAnimation() { PositionIn = Rg.Plugins.Popup.Enums.MoveAnimationOptions.Bottom, PositionOut = Rg.Plugins.Popup.Enums.MoveAnimationOptions.Bottom, DurationIn = 600, DurationOut = 600, EasingIn = Easing.SinIn, EasingOut = Easing.SinOut }; Label titleLabel = new Label() { Text = title, HorizontalOptions = LayoutOptions.Center, VerticalOptions = LayoutOptions.Start, FontAttributes = FontAttributes.Bold, FontSize = 32, TextColor = Color.Black, VerticalTextAlignment = TextAlignment.Center, HorizontalTextAlignment = TextAlignment.Start }; StackLayout sl = new StackLayout() { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.Center, Padding = new Thickness(0, Layouts.Spacing / 2), Orientation = options.Length > 2 ? StackOrientation.Vertical : StackOrientation.Horizontal }; for (int x = 0; x < options.Length; x++) { sl.Children.Add(GetOption(options[x])); } Content = new Frame() { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.End, Padding = Layouts.Margin, HasShadow = false, CornerRadius = 0, BackgroundColor = Color.White, IsClippedToBounds = true, Content = new StackLayout() { HorizontalOptions = LayoutOptions.FillAndExpand, VerticalOptions = LayoutOptions.Center, Children = { titleLabel, sl } } }; }
public OperationDetailsPage(MoneyOperation money) { Money = money; InitializeComponent(); Animation = new Rg.Plugins.Popup.Animations.MoveAnimation() { DurationIn = 200, DurationOut = 200 }; cakeView.BindingContext = Money; }
public FinanceInfoPage(Money money, FinancePage financePage) { FinancePage = financePage; Money = money; InitializeComponent(); allMoneyLabel.Text = string.Format($"{Money.AllMoney:N}"); currentMoneyLabel.Text = string.Format($"{Money.CurrentMoney:N}");; spentMoneyLabel.Text = string.Format($"{Money.AllMoney - Money.CurrentMoney:N}"); Animation = new Rg.Plugins.Popup.Animations.MoveAnimation() { DurationIn = 200, DurationOut = 200 }; }