Coder Social home page Coder Social logo

todoca / prism.plugin.popups Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dansiegel/prism.plugin.popups

0.0 0.0 0.0 3.59 MB

This provides extensibility for Prism.Forms INavigationService to handle Popup Views

Home Page: http://popups.prismplugins.com

License: MIT License

C# 96.23% PowerShell 3.12% HTML 0.65%

prism.plugin.popups's Introduction

Prism.Plugin.Popups

The Popups plugin provides an extremely lightweight framework for implementing Popup Pages using the Rg.Plugin.Popup package with Prism.Forms. To do this we simply provide you with some new implementations of both Prism's Navigation & Dialog Services.

Platform Build Status
VSTS Build Build Status
Package NuGet Sponsor Connect
Prism.Plugin.Popups PluginNuGetShield PluginSponsorConnectShield

Want to consume the CI packages? Sign up as a GitHub sponsor and you can access the Sponsor Connect private feed.

Support

If this project helped you reduce time to develop and made your app better, please be sure to star the project help support Dan.

GitHub Sponsors

Usage

NOTE: We have changed versioning to now follow the Major.Minor from the Prism version that the Popup Plugin is built against. This should help avoid confusion with compatibility particularly as many issues were being reported because developers were updating to a preview of Prism but remaining on the stable build from the Popups Plugin

Getting Started

Install the Prism.Plugin.Popups NuGet to your project. Notice that this has no dependency on a specific DI Container thus allowing your code to work with any container of your choice.

This plugin does not remove any platform initialization requirements that Rg.Plugins.Popup has. Be sure that you have followed all of the Rg.Plugins.Popup guidelines for initializing each Platform (iOS/Android,etc).

To use the plugin you will need to update the Registration for INavigationService. To do this you simply need to add the following:

protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
    // This updates INavigationService and registers PopupNavigation.Instance
    containerRegistry.RegisterPopupNavigationService();
}

It's worth noting that there is a generic overload for the registration method that accepts any type that inherits from PopupPageNavigationService in the event that you have custom logic you need to execute in the NavigationService. The RegisterPopupNavigationService method will also register IPopupNavigation from PopupNavigation.Instance for you.

Prism's underlying Page Navigation Service has a dependency on IPageBehaviorFactory. In order to handle navigation events from tapping outside of (and closing) the PopupPage, this plugin relies on the PopupPageBehaviorFactory which is also registered by the registration method shown above. If you are registering your own custom implementation, be sure to either add the BackgroundPopupDismissalBehavior to PopupPages, or simply inherit from the PopupPageBehaviorFactory.

NOTE: All initializations for Rg.Plugins.Popup should be done in Platform code, the Registrations for the NavigationService should be done in your PrismApplication. No additional initialization is required inside of Prism Modules.

Navigation

There is nothing different about navigating with Popup Pages than Navigating with normal pages. You can even deep link with Popup Pages. The only difference that you will encounter is that when Navigating from a Popup Page to a normal Xamarin.Forms Page, it will Pop any Popup Pages that are currently in the Popup Stack.

prism.plugin.popups's People

Contributors

dansiegel avatar dependabot-preview[bot] avatar f-goncalves avatar dependabot[bot] avatar vardanxamlab avatar kseveri-objectsystems avatar github-actions[bot] avatar chrisg32 avatar ysmoradi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.