Skip to content

Add a default button to TaskDialog if no buttons were setup #55

Open
@augustoproiete

Description

@augustoproiete

Spin-off of #48

If you attempt to call ShowDialog on a TaskDialog that you haven't added any buttons to, the call to ShowDialog will throw an InvalidOperationException.

Example:

var dialog = new Ookii.Dialogs.Wpf.TaskDialog
{
    Content = "Message",
    MainInstruction = "Instruction",
};

dialog.ShowDialog(); // InvalidOperationException

Let's add a default OK button to the TaskDialog if no buttons were setup.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions