Plugin.Maui.Popup 1.0.5

dotnet add package Plugin.Maui.Popup --version 1.0.5
NuGet\Install-Package Plugin.Maui.Popup -Version 1.0.5
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="Plugin.Maui.Popup" Version="1.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Plugin.Maui.Popup --version 1.0.5
#r "nuget: Plugin.Maui.Popup, 1.0.5"
#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 Plugin.Maui.Popup as a Cake Addin
#addin nuget:?package=Plugin.Maui.Popup&version=1.0.5

// Install Plugin.Maui.Popup as a Cake Tool
#tool nuget:?package=Plugin.Maui.Popup&version=1.0.5

Plugin.Maui.Popup

Plugin.Maui.Popup - is a cross-platform plugin for .NET MAUI , Used for displaying content on Popup.

ezgif com-video-to-gif (1)

How To Use

Available on NuGet: https://www.nuget.org/packages/Plugin.Maui.Popup/1.0.5

Install this Plugin in your .NET MAUI Project

Now add following namespace to your content page & replace content page tag with <mauiPopup:BasePopupPage

xmlns:mauiPopup="clr-namespace:MauiPopup.Views;assembly=MauiPopup"

PopupPage.xaml

<?xml version="1.0" encoding="utf-8" ?>
<mauiPopup:BasePopupPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             xmlns:mauiPopup="clr-namespace:MauiPopup.Views;assembly=MauiPopup"
             x:Class="MauiPopupDemo.PopupPage"
             Title="PopupPage">
    <VerticalStackLayout>
        <Label 
            Text="Welcome to .NET MAUI!"
            VerticalOptions="Center" 
            HorizontalOptions="Center" />
    </VerticalStackLayout>
</mauiPopup:BasePopupPage>

PopupPage.xaml.cs

using MauiPopup.Views;
 
namespace MauiPopupDemo;
 
public partial class PopupPage : BasePopupPage
{
	public PopupPage()
	{
		InitializeComponent();
	}
}

How To Display Popup Page

Use following code to display Popup Page

MauiPopup.PopupAction.DisplayPopup(new PopupPage());

How To Close Popup Page

Use following code to close Popup Page

MauiPopup.PopupAction.ClosePopup();

How To Get Value On Popup Close

Pass Any Type of Value On Close PopupMethod

PopupAction.ClosePopup("hi");

To Get String Value

string result = await MauiPopup.PopupAction.DisplayPopup(new PopupPage());

To Get Other Type of Value

string result = await MauiPopup.PopupAction.DisplayPopup<int>(new PopupPage());
string result = await MauiPopup.PopupAction.DisplayPopup<bool>(new PopupPage());
string result = await MauiPopup.PopupAction.DisplayPopup<AnyTypeOfClass>(new PopupPage());
  1. HorizontalOptions : To Adjust Layout Horizontally
  2. VerticalOptions : To Adjust Layout Vertically
  3. IsCloseOnBackgroundClick : Set it to true to close popup on background Click. (By Default True)
  4. Margin : Set Margin of Layout.
  5. ForegroundColor : Used To Set Background Color Of Popup Content.
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-android31.0 is compatible.  net6.0-ios was computed.  net6.0-ios16.1 is compatible.  net6.0-maccatalyst was computed.  net6.0-maccatalyst16.1 is compatible.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net6.0-windows10.0.19041 is compatible.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
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 Plugin.Maui.Popup:

Package Downloads
LukeMauiMarkup

Markup Support

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.5 18,564 3/3/2023
1.0.4 3,517 9/29/2022
1.0.3 633 9/20/2022