FileOnQ.Prism.Popups.XCT 8.1.97-dev.1

.NET Standard 2.0
This is a prerelease version of FileOnQ.Prism.Popups.XCT.
Install-Package FileOnQ.Prism.Popups.XCT -Version 8.1.97-dev.1
dotnet add package FileOnQ.Prism.Popups.XCT --version 8.1.97-dev.1
<PackageReference Include="FileOnQ.Prism.Popups.XCT" Version="8.1.97-dev.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FileOnQ.Prism.Popups.XCT --version 8.1.97-dev.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FileOnQ.Prism.Popups.XCT, 8.1.97-dev.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install FileOnQ.Prism.Popups.XCT as a Cake Addin
#addin nuget:?package=FileOnQ.Prism.Popups.XCT&version=8.1.97-dev.1&prerelease

// Install FileOnQ.Prism.Popups.XCT as a Cake Tool
#tool nuget:?package=FileOnQ.Prism.Popups.XCT&version=8.1.97-dev.1&prerelease
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

FileOnQ.Prism.Popups.XCT

A community plugin for Prism Library built by and maintained by FileOnQ.

FileOnQ.Prism.Popups.XCT is a Prism Library plugin that adds Dialog API support to the Xamarin Community Toolkit Popup Control.

CI Build

Status

This code is used by FileOnQ for our core mobile applications and we are committed to supporting this plugin. We have been using this plugin since 2019 with the original implementation of XCT Popups that was made by Andrew Hoefling.

The project is currently in the initial phase of transitioning the internal library to an open source project for the community. The table below shows the features we want to ship for the first stable release of this plugin.

1st Release Checklist

Phase Status
Initial Code Drop ✅ Done
ContentView ✅ Done
DialogParameters Helpers ✅ Done
Attached Properties Not Started
Prism 8.1 ✅ Done
Prism 8.0 Not Started
Prism 7.2 Not Started
Prism 7.1 Not Started
NuGet Nightly Not Started
NuGet Releases Not Started

Setup

Add the NuGet to all shared code and platform code.

FeedOnQ

Add the following code to your RegisterTypes method in App.xaml.cs

protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
    containerRegistry.UseXctPopups();
}

Then when you want to show a popup resolve the IDialogService. See detailed usage below.

Supported Platforms

The library is dependent on the Xamarin Community Toolkit's popup support. Please check the official documentation at their repository for target platform and versions.

Platform Status
iOS
Android
UWP

Supported Libraries

Library Version Status
Xamarin Community Toolkit 1.2.0+
Prism Library 8.1
Prism Library 8.0 Not Started
Prism Library 7.2 Not Started
Prism Library 7.1 Not Started

Usage

To display a Xamarin Community Toolkit popup you need to complete 2 actions

  1. Run setup method UseXctPopups()
  2. Register your dialog
  3. Using the IDialogService display your popup

Run Setup Method

In your App.xaml.cs you will need to add the following method to the RegisterTypes method.

protected override void RegisterTypes(IContainerRegistry containerRegistry)
{
    containerRegistry.UseXctPopups();
}

Register Dialog

Create a standard Xamarin Community Toolkit using the Popup class.

SamplePopup.xaml

<?xml version="1.0" encoding="utf-8" ?>
<xct:Popup xmlns="http://xamarin.com/schemas/2014/forms"
           xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
           xmlns:xct="http://xamarin.com/schemas/2020/toolkit"
           Size="250, 250"
           x:Class="PrismPopupsSample.Views.SamplePopup">

    <xct:Popup.Content>
        <StackLayout>
            <Label Text="Hello from XCT Popup!"  />
        </StackLayout>
    </xct:Popup.Content>
    
</xct:Popup>

In your App.xaml.cs you need to register your dialog with Prism.

containerRegistry.RegisterDialog<SamplePopup>("sample");

Show Popup

To display the popup you will need to resolve the IDialogService and display it.

public class MainViewModel
{
    IDialogService dialogService;
    public MainViewModel(IDialogService dialogService) =>
        this.dialogService = dialogService;

    void ShowPopup() =>
        this.dialogService.ShowDialog("sample");
}

Documentation

For complete documentation visit the official documentation.

Work in progess

Created By FileOnQ

This plugin was created by Andrew Hoefling and donated to the open source community by FileOnQ, Inc.

Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
.NET Standard netstandard2.0 netstandard2.1
.NET Framework net461 net462 net463 net47 net471 net472 net48
MonoAndroid monoandroid
MonoMac monomac
MonoTouch monotouch
Tizen tizen40 tizen60
Xamarin.iOS xamarinios
Xamarin.Mac xamarinmac
Xamarin.TVOS xamarintvos
Xamarin.WatchOS xamarinwatchos
Compatible target framework(s)
Additional computed target framework(s)
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
8.1.97-dev.1 118 7/21/2021