Template10.Services.DialogService 1.0.2

Handy Dialog Service for WinRT. Part of Template 10, a Library of Helpers for UWP.

Install-Package Template10.Services.DialogService -Version 1.0.2
dotnet add package Template10.Services.DialogService --version 1.0.2
<PackageReference Include="Template10.Services.DialogService" Version="1.0.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Template10.Services.DialogService --version 1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Template10.Services.DialogService, 1.0.2"
#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 Template10.Services.DialogService as a Cake Addin
#addin nuget:?package=Template10.Services.DialogService&version=1.0.2

// Install Template10.Services.DialogService as a Cake Tool
#tool nuget:?package=Template10.Services.DialogService&version=1.0.2
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

DialogService

DialogService simplifies the common ways of interacting with the UWP ContentDialog and MessageBox types. The MessageBoxEx class provides a simple way of displaying ContentDialog instances. The DialogService provides methods to simplify the display of the MessageBoxEx and the DialogManager is used to ensure only a single MessageBoxEx instance is displayed at any one time.

public interface IDialogService
{
    Task<IUICommand> ShowAsync(MessageDialog dialog, TimeSpan? timeout = null, CancellationToken? token = null);
        
    Task<ContentDialogResult> ShowAsync(ContentDialog dialog, TimeSpan? timeout = null, CancellationToken? token = null);
        
    Task<MessageBoxResult> AlertAsync(string content, IDialogResourceResolver resolver = null);

    Task<MessageBoxResult> AlertAsync(string title, string content, IDialogResourceResolver resolver = null);

    Task<MessageBoxResult> PromptAsync(string content, MessageBoxType type = MessageBoxType.YesNo, IDialogResourceResolver resolver = null);

    Task<MessageBoxResult> PromptAsync(string title, string content, MessageBoxType type = MessageBoxType.YesNo, IDialogResourceResolver resolver = null);

    Task<bool> PromptAsync(string content, MessageBoxType type, MessageBoxResult expected, IDialogResourceResolver resolver = null);

    Task<bool> PromptAsync(string title, string content, MessageBoxType type, MessageBoxResult expected, IDialogResourceResolver resolver = null);
}

public interface IMessageBoxEx
{
    IDialogResourceResolver Resolver { get; set; }
    MessageBoxType Type { get; set; }
    string Text { get; set; }
    ElementTheme RequestedTheme { get; set; }
}

DialogService

DialogService simplifies the common ways of interacting with the UWP ContentDialog and MessageBox types. The MessageBoxEx class provides a simple way of displaying ContentDialog instances. The DialogService provides methods to simplify the display of the MessageBoxEx and the DialogManager is used to ensure only a single MessageBoxEx instance is displayed at any one time.

public interface IDialogService
{
    Task<IUICommand> ShowAsync(MessageDialog dialog, TimeSpan? timeout = null, CancellationToken? token = null);
        
    Task<ContentDialogResult> ShowAsync(ContentDialog dialog, TimeSpan? timeout = null, CancellationToken? token = null);
        
    Task<MessageBoxResult> AlertAsync(string content, IDialogResourceResolver resolver = null);

    Task<MessageBoxResult> AlertAsync(string title, string content, IDialogResourceResolver resolver = null);

    Task<MessageBoxResult> PromptAsync(string content, MessageBoxType type = MessageBoxType.YesNo, IDialogResourceResolver resolver = null);

    Task<MessageBoxResult> PromptAsync(string title, string content, MessageBoxType type = MessageBoxType.YesNo, IDialogResourceResolver resolver = null);

    Task<bool> PromptAsync(string content, MessageBoxType type, MessageBoxResult expected, IDialogResourceResolver resolver = null);

    Task<bool> PromptAsync(string title, string content, MessageBoxType type, MessageBoxResult expected, IDialogResourceResolver resolver = null);
}

public interface IMessageBoxEx
{
    IDialogResourceResolver Resolver { get; set; }
    MessageBoxType Type { get; set; }
    string Text { get; set; }
    ElementTheme RequestedTheme { get; set; }
}

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Template10.Services.DialogService:

Package Downloads
Template10.Services.NagService
Handy Nag Service for WinRT. Part of Template 10, a Library of Helpers for UWP.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Template10.Services.DialogService:

Repository Stars
Windows-XAML/Template10
Making Windows 10 apps great again

Version History

Version Downloads Last updated
1.0.2 1,938 10/5/2019
1.0.1 197 10/5/2019
1.0.0 218 9/28/2019