Skip to content

NullReferenceException when showing TaskDialog without buttons #48

@mgpreston

Description

@mgpreston

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

Could this be improved to throw a more meaningful exception - or perhaps add a default button to it?

Example:

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

dialog.ShowDialog(); // NullReferenceException here. dialog is not null.

Thank you!

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions