In This Article

UserPromptExtensions Class

Provides extension methods for types related to UserPromptControl.

public static class UserPromptExtensions
Inheritance:
object object

Methods

ForException(UserPromptBuilder, Exception, string?)

Configures the builder to display an exception.

public static UserPromptBuilder ForException(this UserPromptBuilder builder, Exception ex, string? header = null)
Parameter Type Description
builder UserPromptBuilder

The builder to configure.

ex Exception

The exception to show.

header string

The optional header message. If not specified, the type of the exception will be used.

Returns

UserPromptBuilder:

The builder, for use with method-chaining.

Exceptions

Type Condition
ArgumentNullException

ToUIButtonText(UserPromptStandardResult)

Converts a UserPromptStandardResult value the text, if any, that defines a dialog button with that result.

public static string? ToUIButtonText(this UserPromptStandardResult standardResult)
Parameter Type Description
standardResult UserPromptStandardResult

The UserPromptStandardResult value to examine.

Returns

string:

The dialog button text of the result, or null if text is not associated with the result.

Inherited Members