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
<PackageReference Include="Plugin.Maui.Popup" Version="1.0.5" />
paket add Plugin.Maui.Popup --version 1.0.5
#r "nuget: Plugin.Maui.Popup, 1.0.5"
// 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.
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());
Popup Page Formation Property
- HorizontalOptions : To Adjust Layout Horizontally
- VerticalOptions : To Adjust Layout Vertically
- IsCloseOnBackgroundClick : Set it to true to close popup on background Click. (By Default True)
- Margin : Set Margin of Layout.
- ForegroundColor : Used To Set Background Color Of Popup Content.
Product | Versions 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. |
-
net6.0
- No dependencies.
-
net6.0-android31.0
- No dependencies.
-
net6.0-ios16.1
-
net6.0-maccatalyst16.1
-
net6.0-windows10.0.19041
- No dependencies.
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.