question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Popup

  • Proposed
  • Prototype
  • Implementation
    • iOS Support
    • Android Support
    • macOS Support
    • Windows Support
  • Unit Tests
  • Sample
  • Documentation

Summary

A customizable popup

Detailed Design

Popup.shared.cs

public class Popup<T> : BasePopupView
{  
  public static readonly BindableProperty ContentProperty;
  public static readonly BindableProperty ColorProperty;
  public static readonly BindableProperty SizeProperty;
  public static readonly BindableProperty VerticalOptionsProperty;
  public static readonly BindableProperty HorizontalOptionsProperty;
  
  public Task<T?> Result { get; }
  public virtual View? Content { get; set; }
  public Color Color { get; set; }
  public LayoutOptions VerticalOptions { get; set; }
  public LayoutOptions HorizontalOptions { get; set; }
  public View? Anchor { get; set; }
  public Size Size { get; set; }
  public bool IsLightDismissEnabled { get; set; }
  public event EventHandler<PopupDismissedEventArgs> Dismissed;
  public event EventHandler<PopupOpenedEventArgs> Opened;
  
  public void Reset();
  public void Dismiss(T? result);
}

// Both `Popup` and `Snackbar` should inherit from `BasePopupView` 
public abstract class BasePopupView
{
  public static readonly BindableProperty IsShown; // One-way binding
  public static readonly BindableProperty AnchorProperty; // Two-way binding
  public static readonly BindableProperty AppearingAnimationProperty; // Two-way binding
  public static readonly BindableProperty DisappearingAnimationProperty; // Two-way binding

  public bool IsShown { get; private set; }

  public IView Anchor { get; set; } = GetDefaultAnchor();
  public Animation AppearingAnimation { get; set; } = GetDefaultAnimation();
  public Animation DisappearingAnimation { get; set; } = GetDefaultAnimation();

  public event EventHandler Shown;
  public event EventHandler Dismissed;

  public abstract Task Show();
  public abstract Task Dismiss();

  private Animation GetDefaultAnimation();

  private IView GetDefaultAnchor();
}

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
maxkoshevoicommented, Feb 20, 2022

Maybe it’s too late, but how are you looking at using Rg.Plugins.Popups port as a popup view in the toolkit? It has more features and is already widely used.

CC: @LuckyDucko

0reactions
msftbot[bot]commented, Mar 14, 2022

Reopening Proposal.

Only Proposals moved to the Closed Project Column and Completed Project Column can be closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The Pop-Up Proposal | Unique Proposal Idea
the Pop-up Proposal. Engagement Package. 2 Hours Staring at $675. You plan the time, location and setting. We take care of everything else...
Read more >
Proposal Pop up Box
Check out our proposal pop up box selection for the very best in unique or custom, handmade pieces from our birthday cards shops....
Read more >
How to Create Your Pop-Up Business Plan
Take a standard startup business plan template and use it as a guide to help you plan the perfect pop-up shop. Of course,...
Read more >
Request a Proposal - Pop Up Agency
Provide us with some information here and one of our Pop-Up Specialists will reach out to you asap! ... Pop Up Proposal Request...
Read more >
110 POP UP STORE PROPOSAL ideas - Pinterest
Mar 21, 2022 - Explore · ·'s board "POP UP STORE PROPOSAL" on Pinterest. See more ideas about pop up store, retail design,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found