Skip to content

Latest commit

 

History

History
54 lines (42 loc) · 1.51 KB

File metadata and controls

54 lines (42 loc) · 1.51 KB

Dialogs

CodeClimate CodeFactor

Managed Win32 task dialog wrapper. Supports all native Task Dialog features.

Information

In order to use activation contexts, this package copies the XPThemes.manifest file to the output directory.

Usage

Simple

Shows a simple task dialog.

using Scover.Dialogs;

using Page page = new()
{
    Content = "Sample text",
    Buttons = { Button.Yes, Button.No, Button.Cancel }
};

var clickedButton = new Dialog(page).Show();

Multi-page

using Scover.Dialogs;

using Page page1 = new()
{
    MainInstruction = "Page #1",
    Buttons = new(ButtonStyle.CommandLinks)
    {
        { "Label", "Supplemental instruction" },
        Button.Cancel
    }
};
using Page page2 = new()
{
    MainInstruction = "Page #2",
    Expander = new("Expanded information") 
};

var clickedButton = new MultiPageDialog(page1, new Dictionary<Page, NextPageSelector>
{
    [page1] = request => request.Kind is NavigationRequestKind.Cancel ? null : page2,
}).Show();

Check out Tests.cs for more examples.