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(MessageBoxResult)
Converts a MessageBoxResult value to the text, if any, that defines a dialog button with that result.
public static string? ToUIButtonText(this MessageBoxResult result)
Parameter | Type | Description |
---|---|---|
result | MessageBoxResult | The MessageBoxResult value to examine. |
Returns
- string:
The dialog button text of the result, or
null
if text is not associated with the result.