Jc.PopupView.Avalonia 0.1.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package Jc.PopupView.Avalonia --version 0.1.0
                    
NuGet\Install-Package Jc.PopupView.Avalonia -Version 0.1.0
                    
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="Jc.PopupView.Avalonia" Version="0.1.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Jc.PopupView.Avalonia" Version="0.1.0" />
                    
Directory.Packages.props
<PackageReference Include="Jc.PopupView.Avalonia" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Jc.PopupView.Avalonia --version 0.1.0
                    
#r "nuget: Jc.PopupView.Avalonia, 0.1.0"
                    
#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.
#:package Jc.PopupView.Avalonia@0.1.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Jc.PopupView.Avalonia&version=0.1.0
                    
Install as a Cake Addin
#tool nuget:?package=Jc.PopupView.Avalonia&version=0.1.0
                    
Install as a Cake Tool

Jc.PopupView.Avalonia

Beautiful, animinated toasts, alerts, and other popups for Avalonia UI.


Table of Contents

Screenshots

Toasts Sheets Floaters Popups
<img src="media/toasts.gif" /> <img src="media/sheets.gif" /> Coming soon Cooming soon

Introduction

Jc.PopupView.Avalonia is a library to bring beautiful, animated toasts, alerts, and other popups for Avalonia UI.

This includes toast popups, iOS "sheet" likes, "floaters" and regular popups designed specifically for use with Android and iOS to make your apps beautiful with ease and interactive.

Usage

Note: The package is currently unavailable until version 1.0 release. These are just placehodler usage docs for now - you can always clone the repo and use like that, but will not automatically receive updates for release where API may change.

Get Started

To use Jc.PopupView.Avalonia you must add the Jc.PopupView.Avalonia package to your project.

dotnet add package Jc.PopupView.Avalonia

Then you must add the styles to your app styles:

<Application.Styles>
    
    <popup:JcPopupView />
</Application.Styles>

Add a DialogHost control to the root of your application:

<popup:DialogHost>
    
</popup:DialogHost>

Dialog Service

The dialog service implements the interface IDialogService:

public interface IDialogService
{
    void OpenSheet<TContent>(TContent content, Action<Sheet>? configure = null)
        where TContent : Control;
    void CloseSheet<TContent>(TContent content) 
        where TContent : Control;
    void OpenToast<TContent>(TContent content, Action<Toast>? configure = null) 
        where TContent : Control;
    void CloseToast<TContent>(TContent content) 
        where TContent : Control;
}

Each open method allows you to configure the relevant control directly before opening. To close a popup, you must pass in a reference to the control the popup is displaying (the same reference passed into the open method).

Common

Common popup properties to be configured:

Property Default Description
IsOpen false Whether the popup is open - setting this value triggers animations
AnimationDuration 0:0:0.2 Popup animation duration
Easing CubicEaseOut Animation easing function
ClickOnOutsideToDismiss false Clicking outside the popup closes the popup
ClickToDismiss false Clicking the popup itself closes the popup
ShowBackgroundMask true Shows the popup background mask
MaskColor The color of the background mask

Toasts

<popup:DialogHost.Toasts>
    <popup:Toast>
        
    </popup:Toast>
</popup:DialogHost.Toasts>

Toasts can be configured as:

Property Default Description
ClickToDismiss true Clicking the popup itself closes the popup
ShowBackgroundMask false Shows the popup background mask
Location Top The location the toast appears (Top or Bottom)

Sheets

<popup:DialogHost.Sheets>
    
    <popup:Sheet>
        
    </popup:Sheet>
</popup:DialogHost.Sheets>

Sheets can be configured as:

Property Default Description
AnimationDuration 0:0:0.5 Popup animation duration
ClickToDismiss false Attempting to set this on a sheet results in an invalid operation exception
PillLocation Internal Location of the drag indicator pill (Internal or External)
PillColor The color of the drag indicator pill
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.3.400 107 8/17/2025
0.3.300 58 8/16/2025
0.3.200 61 8/16/2025
0.3.100 56 8/16/2025
0.3.0 135 8/13/2025
0.2.0 136 8/12/2025
0.1.0 210 8/5/2025