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

Base types

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.

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.

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


Discussion