MessageService

Name Value
Assembly Catel.Core
Namespace Catel.Services
Available on .NET Framework 4.5, .NET Framework 4.6, Portable Class Libraries, Xamarin - Android, Xamarin - iOS
public class MessageService : IMessageService, ViewModelServiceBase

Base types ViewModelServiceBase

Implements interfaces IMessageService

Message service that implements the IMessageService.

Fields

Constructors

MessageService(IDispatcherService dispatcherService)

Initializes a new instance of the MessageService class.

Parameters

Name Description
dispatcherService The dispatcher service.

Exceptions

Name Description
ArgumentNullException The dispatcherService isnull.

Methods

ShowAsync(string message, string caption, MessageButton button, MessageImage icon)

Shows an information message to the user and allows a callback operation when the message is completed.

Parameters

Name Description
message The message.
caption The caption.
button The button.
icon The icon.

Exceptions

Name Description
ArgumentException The message isnull or whitespace.

ShowErrorAsync(Exception exception)

Shows an error message to the user and allows a callback operation when the message is completed.

Parameters

Name Description
exception The exception.

Exceptions

Name Description
ArgumentNullException The exception isnull.

ShowErrorAsync(string message, string caption)

Shows an error message to the user and allows a callback operation when the message is completed.

Parameters

Name Description
message The message.
caption The caption.

Exceptions

Name Description
ArgumentException The message isnull or whitespace.

ShowInformationAsync(string message, string caption)

Shows an information message to the user and allows a callback operation when the message is completed.

Parameters

Name Description
message The message.
caption The caption.

Exceptions

Name Description
ArgumentException The message isnull or whitespace.

ShowMessageBoxAsync(string message, string caption, MessageButton button, MessageImage icon)

Shows the message box.

Parameters

Name Description
message The message.
caption The caption.
button The button.
icon The icon.

Returns

The message result.

Exceptions

Name Description
ArgumentException The message isnull or whitespace.

ShowWarningAsync(string message, string caption)

Shows a warning message to the user and allows a callback operation when the message is completed.

Parameters

Name Description
message The message.
caption The caption.

Exceptions

Name Description
ArgumentException The message isnull or whitespace.

TranslateMessageBoxResult(MessageBoxResult result)

Translates the message box result.

Parameters

Name Description
result The result.

Returns

Corresponding MessageResult.

TranslateMessageButton(MessageButton button)

Translates the message button.

Parameters

Name Description
button The button.

Returns

Corresponding.

TranslateMessageImage(MessageImage image)

Translates the message image.

Parameters

Name Description
image The image.

Returns

Corresponding.


Have a question about Catel? Use StackOverflow with the Catel tag!


Discussion