MPowerKit.Popups 1.2.3

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package MPowerKit.Popups --version 1.2.3                
NuGet\Install-Package MPowerKit.Popups -Version 1.2.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="MPowerKit.Popups" Version="1.2.3" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add MPowerKit.Popups --version 1.2.3                
#r "nuget: MPowerKit.Popups, 1.2.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install MPowerKit.Popups as a Cake Addin
#addin nuget:?package=MPowerKit.Popups&version=1.2.3

// Install MPowerKit.Popups as a Cake Tool
#tool nuget:?package=MPowerKit.Popups&version=1.2.3                

MPowerKit.Popups

.NET MAUI popup library which allows you to open MAUI pages as a popup. Also the library allows you to use very simple and flexible animations for showing popup pages.

NuGet

"Buy Me A Coffee"

Inspired by Rg.Plugins.Popup and Mopups, but implementation is completely different.

  • It has almost the same PopupPage API as packages above, but improved animations, removed redundant properties as KeyboardOffset, changed names of some properties.

  • Improved code and fixed some known bugs, eg Android window insets (system padding) or animation flickering.

  • Changed API of PopupService, now you have an ability to choose a window to show/hide popup on.

  • Under the hood platform specific code does not use custom renderers for PopupPage.

  • Hiding keyboard when tapping anywhere on popup except entry field

  • PopupStack is not static from now.

  • All API's are public or protected from now, so you can easily override and change implementation as you want

Supported Platforms

  • .NET8
  • .NET8 for Android (min 23)
  • .NET8 for iOS (min 13.0)
  • .NET8 for MacCatalyst (min 13.1)
  • .NET8 for Windows (min 10.0.17763.0)

Note: .NET8 for Tizen is not supported, but your PRs are welcome.

Setup

Add UseMPowerKitPopups() to your MauiProgram.cs file as next

builder
    .UseMauiApp<App>()
    .UseMPowerKitPopups();

Usage

You can use both registered IPopupService or static singletone PopupService.Current

Inherit your popup page from PopupPage:

public class YourCustomPopup : PopupPage...

Show popup:

IPopupService _popupService;

YourCustomPopup _popup;

await _popupService.ShowPopupAsync(_popup, animated);

It has overload for showing popup which accepts a window of type Window, on which the popup will be shown:

IPopupService _popupService;

YourCustomPopup _popup;

await _popupService.ShowPopupAsync(_popup, desiredWindow, animated);

Hide popup (the last one from PopupStack):

IPopupService _popupService;

await _popupService.HidePopupAsync(animated);

And overload for hiding desired popup:

IPopupService _popupService;

YourCustomPopup _popup;

await _popupService.HidePopupAsync(_popup, animated);

Note: Don't forget to catch informative exceptions;

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-android34.0 is compatible.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-ios17.2 is compatible.  net8.0-maccatalyst was computed.  net8.0-maccatalyst17.2 is compatible.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net8.0-windows10.0.22621 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on MPowerKit.Popups:

Package Downloads
MPowerKit.Navigation.Popups

.NET MAUI MVVM navigation framework. It supports regular/modal navigation, opening/closing windows, regions, popups

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.3.0 312 9/9/2024
1.2.4 143 8/30/2024
1.2.3 118 8/28/2024
1.2.2 109 8/28/2024
1.2.1 202 8/15/2024
1.2.0 138 7/30/2024
1.1.5 160 4/22/2024
1.1.4 163 2/15/2024
1.1.3 123 2/15/2024
1.1.2 161 1/21/2024
1.1.1 206 12/18/2023
1.1.0 117 12/18/2023
1.0.1 149 12/15/2023
1.0.0 118 12/15/2023