GalaSoft.MvvmLight
This interface is meant for the class and can be
useful if you store multiple WeakAction{T} instances but don't know in advance
what type T represents.
Executes an action.
A parameter passed as an object,
to be casted to the appropriate type.
The Messenger is a class allowing objects to exchange messages.
The Messenger is a class allowing objects to exchange messages.
Registers a recipient for a type of message TMessage. The action
parameter will be executed when a corresponding message is sent.
Registering a recipient does not create a hard reference to it,
so if this recipient is deleted, no memory leak is caused.
The type of message that the recipient registers
for.
The recipient that will receive the messages.
The action that will be executed when a message
of type TMessage is sent.
Registers a recipient for a type of message TMessage.
The action parameter will be executed when a corresponding
message is sent. See the receiveDerivedMessagesToo parameter
for details on how messages deriving from TMessage (or, if TMessage is an interface,
messages implementing TMessage) can be received too.
Registering a recipient does not create a hard reference to it,
so if this recipient is deleted, no memory leak is caused.
The type of message that the recipient registers
for.
The recipient that will receive the messages.
If true, message types deriving from
TMessage will also be transmitted to the recipient. For example, if a SendOrderMessage
and an ExecuteOrderMessage derive from OrderMessage, registering for OrderMessage
and setting receiveDerivedMessagesToo to true will send SendOrderMessage
and ExecuteOrderMessage to the recipient that registered.
Also, if TMessage is an interface, message types implementing TMessage will also be
transmitted to the recipient. For example, if a SendOrderMessage
and an ExecuteOrderMessage implement IOrderMessage, registering for IOrderMessage
and setting receiveDerivedMessagesToo to true will send SendOrderMessage
and ExecuteOrderMessage to the recipient that registered.
The action that will be executed when a message
of type TMessage is sent.
Sends a message to registered recipients. The message will
reach all recipients that registered for this message type
using one of the Register methods.
The type of message that will be sent.
The message to send to registered recipients.
Sends a message to registered recipients. The message will
reach only recipients that registered for this message type
using one of the Register methods, and that are
of the targetType.
The type of message that will be sent.
The type of recipients that will receive
the message. The message won't be sent to recipients of another type.
The message to send to registered recipients.
Unregisters a messager recipient completely. After this method
is executed, the recipient will not receive any messages anymore.
The recipient that must be unregistered.
Unregisters a message recipient for a given type of messages only.
After this method is executed, the recipient will not receive messages
of type TMessage anymore, but will still receive other message types (if it
registered for them previously).
The type of messages that the recipient wants
to unregister from.
The recipient that must be unregistered.
Unregisters a message recipient for a given type of messages and for
a given action. Other message types will still be transmitted to the
recipient (if it registered for them previously). Other actions that have
been registered for the message type TMessage and for the given recipient (if
available) will also remain available.
The type of messages that the recipient wants
to unregister from.
The recipient that must be unregistered.
The action that must be unregistered for
the recipient and for the message type TMessage.
Provides a way to override the Messenger.Default instance with
a custom instance, for example for unit testing purposes.
The instance that will be used as Messenger.Default.
Sets the Messenger's default (static) instance to null.
Registers a recipient for a type of message TMessage. The action
parameter will be executed when a corresponding message is sent.
Registering a recipient does not create a hard reference to it,
so if this recipient is deleted, no memory leak is caused.
The type of message that the recipient registers
for.
The recipient that will receive the messages.
The action that will be executed when a message
of type TMessage is sent.
Registers a recipient for a type of message TMessage.
The action parameter will be executed when a corresponding
message is sent. See the receiveDerivedMessagesToo parameter
for details on how messages deriving from TMessage (or, if TMessage is an interface,
messages implementing TMessage) can be received too.
Registering a recipient does not create a hard reference to it,
so if this recipient is deleted, no memory leak is caused.
The type of message that the recipient registers
for.
The recipient that will receive the messages.
If true, message types deriving from
TMessage will also be transmitted to the recipient. For example, if a SendOrderMessage
and an ExecuteOrderMessage derive from OrderMessage, registering for OrderMessage
and setting receiveDerivedMessagesToo to true will send SendOrderMessage
and ExecuteOrderMessage to the recipient that registered.
Also, if TMessage is an interface, message types implementing TMessage will also be
transmitted to the recipient. For example, if a SendOrderMessage
and an ExecuteOrderMessage implement IOrderMessage, registering for IOrderMessage
and setting receiveDerivedMessagesToo to true will send SendOrderMessage
and ExecuteOrderMessage to the recipient that registered.
The action that will be executed when a message
of type TMessage is sent.
Registers a recipient for a type of message TMessage.
The action parameter will be executed when a corresponding
message is sent.
Registering a recipient does not create a hard reference to it,
so if this recipient is deleted, no memory leak is caused.
The type of message that the recipient registers
for.
The recipient that will receive the messages.
A token for a messaging channel. If a recipient registers
using a token, and a sender sends a message using the same token, then this
message will be delivered to the recipient. Other recipients who did not
use a token when registering (or who used a different token) will not
get the message. Similarly, messages sent without any token, or with a different
token, will not be delivered to that recipient.
The action that will be executed when a message
of type TMessage is sent.
Registers a recipient for a type of message TMessage.
The action parameter will be executed when a corresponding
message is sent. See the receiveDerivedMessagesToo parameter
for details on how messages deriving from TMessage (or, if TMessage is an interface,
messages implementing TMessage) can be received too.
Registering a recipient does not create a hard reference to it,
so if this recipient is deleted, no memory leak is caused.
The type of message that the recipient registers
for.
The recipient that will receive the messages.
A token for a messaging channel. If a recipient registers
using a token, and a sender sends a message using the same token, then this
message will be delivered to the recipient. Other recipients who did not
use a token when registering (or who used a different token) will not
get the message. Similarly, messages sent without any token, or with a different
token, will not be delivered to that recipient.
If true, message types deriving from
TMessage will also be transmitted to the recipient. For example, if a SendOrderMessage
and an ExecuteOrderMessage derive from OrderMessage, registering for OrderMessage
and setting receiveDerivedMessagesToo to true will send SendOrderMessage
and ExecuteOrderMessage to the recipient that registered.
Also, if TMessage is an interface, message types implementing TMessage will also be
transmitted to the recipient. For example, if a SendOrderMessage
and an ExecuteOrderMessage implement IOrderMessage, registering for IOrderMessage
and setting receiveDerivedMessagesToo to true will send SendOrderMessage
and ExecuteOrderMessage to the recipient that registered.
The action that will be executed when a message
of type TMessage is sent.
Sends a message to registered recipients. The message will
reach all recipients that registered for this message type
using one of the Register methods.
The type of message that will be sent.
The message to send to registered recipients.
Sends a message to registered recipients. The message will
reach only recipients that registered for this message type
using one of the Register methods, and that are
of the targetType.
The type of message that will be sent.
The type of recipients that will receive
the message. The message won't be sent to recipients of another type.
The message to send to registered recipients.
Sends a message to registered recipients. The message will
reach only recipients that registered for this message type
using one of the Register methods, and that are
of the targetType.
The type of message that will be sent.
The message to send to registered recipients.
A token for a messaging channel. If a recipient registers
using a token, and a sender sends a message using the same token, then this
message will be delivered to the recipient. Other recipients who did not
use a token when registering (or who used a different token) will not
get the message. Similarly, messages sent without any token, or with a different
token, will not be delivered to that recipient.
Unregisters a messager recipient completely. After this method
is executed, the recipient will not receive any messages anymore.
The recipient that must be unregistered.
Unregisters a message recipient for a given type of messages only.
After this method is executed, the recipient will not receive messages
of type TMessage anymore, but will still receive other message types (if it
registered for them previously).
The type of messages that the recipient wants
to unregister from.
The recipient that must be unregistered.
Unregisters a message recipient for a given type of messages and for
a given action. Other message types will still be transmitted to the
recipient (if it registered for them previously). Other actions that have
been registered for the message type TMessage and for the given recipient (if
available) will also remain available.
The type of messages that the recipient wants
to unregister from.
The recipient that must be unregistered.
The action that must be unregistered for
the recipient and for the message type TMessage.
Gets the Messenger's default instance, allowing
to register and send messages in a static manner.
Basis class for the class. This
class allows a recipient to register for all PropertyChangedMessages without
having to specify the type T.
Base class for all messages broadcasted by the Messenger.
You can create your own message types by extending this class.
Initializes a new instance of the MessageBase class.
Initializes a new instance of the MessageBase class.
The message's original sender.
Initializes a new instance of the MessageBase class.
The message's original sender.
The message's intended target. This parameter can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
Gets or sets the message's sender.
Gets or sets the message's intended target. This property can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
Initializes a new instance of the class.
The message's sender.
The name of the property that changed.
Initializes a new instance of the class.
The message's sender.
The message's intended target. This parameter can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
The name of the property that changed.
Initializes a new instance of the class.
The name of the property that changed.
Gets or sets the name of the property that changed.
Passes a string property name (PropertyName) and a generic value
( and ) to a recipient.
This message type can be used to propagate a PropertyChanged event to
a recipient using the messenging system.
The type of the OldValue and NewValue property.
Initializes a new instance of the class.
The message's sender.
The property's value before the change occurred.
The property's value after the change occurred.
The name of the property that changed.
Initializes a new instance of the class.
The property's value before the change occurred.
The property's value after the change occurred.
The name of the property that changed.
Initializes a new instance of the class.
The message's sender.
The message's intended target. This parameter can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
The property's value before the change occurred.
The property's value after the change occurred.
The name of the property that changed.
Gets the value that the property has after the change.
Gets the value that the property had before the change.
Passes a string message (Notification) and a generic value (Content) to a recipient.
The type of the Content property.
Passes a generic value (Content) to a recipient.
The type of the Content property.
Initializes a new instance of the GenericMessage class.
The message content.
Initializes a new instance of the GenericMessage class.
The message's sender.
The message content.
Initializes a new instance of the GenericMessage class.
The message's sender.
The message's intended target. This parameter can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
The message content.
Gets or sets the message's content.
Initializes a new instance of the NotificationMessage class.
A value to be passed to recipient(s).
A string containing any arbitrary message to be
passed to recipient(s)
Initializes a new instance of the NotificationMessage class.
The message's sender.
A value to be passed to recipient(s).
A string containing any arbitrary message to be
passed to recipient(s)
Initializes a new instance of the NotificationMessage class.
The message's sender.
The message's intended target. This parameter can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
A value to be passed to recipient(s).
A string containing any arbitrary message to be
passed to recipient(s)
Gets a string containing any arbitrary message to be
passed to recipient(s).
Provides a message class with a built-in callback. When the recipient
is done processing the message, it can execute the callback to
notify the sender that it is done. Use the
method to execute the callback. The callback method has one parameter.
.
The type of the callback method's
only parameter.
Provides a message class with a built-in callback. When the recipient
is done processing the message, it can execute the callback to
notify the sender that it is done. Use the
method to execute the callback. The callback method has one parameter.
and
.
Passes a string message (Notification) to a recipient.
Typically, notifications are defined as unique strings in a static class. To define
a unique string, you can use Guid.NewGuid().ToString() or any other unique
identifier.
Initializes a new instance of the NotificationMessage class.
A string containing any arbitrary message to be
passed to recipient(s)
Initializes a new instance of the NotificationMessage class.
The message's sender.
A string containing any arbitrary message to be
passed to recipient(s)
Initializes a new instance of the NotificationMessage class.
The message's sender.
The message's intended target. This parameter can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
A string containing any arbitrary message to be
passed to recipient(s)
Gets a string containing any arbitrary message to be
passed to recipient(s).
Initializes a new instance of the class.
An arbitrary string that will be
carried by the message.
The callback method that can be executed
by the recipient to notify the sender that the message has been
processed.
Initializes a new instance of the class.
The message's sender.
An arbitrary string that will be
carried by the message.
The callback method that can be executed
by the recipient to notify the sender that the message has been
processed.
Initializes a new instance of the class.
The message's sender.
The message's intended target. This parameter can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
An arbitrary string that will be
carried by the message.
The callback method that can be executed
by the recipient to notify the sender that the message has been
processed.
Executes the callback that was provided with the message with an
arbitrary number of parameters.
A number of parameters that will
be passed to the callback method.
The object returned by the callback method.
Initializes a new instance of the
class.
An arbitrary string that will be
carried by the message.
The callback method that can be executed
by the recipient to notify the sender that the message has been
processed.
Initializes a new instance of the
class.
The message's sender.
An arbitrary string that will be
carried by the message.
The callback method that can be executed
by the recipient to notify the sender that the message has been
processed.
Initializes a new instance of the
class.
The message's sender.
The message's intended target. This parameter can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
An arbitrary string that will be
carried by the message.
The callback method that can be executed
by the recipient to notify the sender that the message has been
processed.
Executes the callback that was provided with the message.
A parameter requested by the message's
sender and providing additional information on the recipient's
state.
Stores an Action without causing a hard reference
to be created to the Action's owner. The owner can be garbage collected at any time.
The type of the Action's parameter.
Stores an without causing a hard reference
to be created to the Action's owner. The owner can be garbage collected at any time.
Initializes a new instance of the class.
The action's owner.
The action that will be associated to this instance.
Executes the action. This only happens if the action's owner
is still alive.
Sets the reference that this instance stores to null.
Gets the Action associated to this instance.
Gets a value indicating whether the Action's owner is still alive, or if it was collected
by the Garbage Collector already.
Gets the Action's owner. This object is stored as a .
Initializes a new instance of the WeakAction class.
The action's owner.
The action that will be associated to this instance.
Executes the action. This only happens if the action's owner
is still alive. The action's parameter is set to default(T).
Executes the action. This only happens if the action's owner
is still alive.
A parameter to be passed to the action.
Executes the action with a parameter of type object. This parameter
will be casted to T. This method implements
and can be useful if you store multiple WeakAction{T} instances but don't know in advance
what type T represents.
The parameter that will be passed to the action after
being casted to T.
Gets the Action associated to this instance.
Defines a common interface for classes that should be cleaned up,
but without the implications that IDisposable presupposes. An instance
implementing ICleanup can be cleaned up without being
disposed and garbage collected.
Cleans up the instance, for example by saving its state,
removing resources, etc...
Provides a message class with a built-in callback. When the recipient
is done processing the message, it can execute the callback to
notify the sender that it is done. Use the
method to execute the callback.
Initializes a new instance of the
class.
An arbitrary string that will be
carried by the message.
The callback method that can be executed
by the recipient to notify the sender that the message has been
processed.
Initializes a new instance of the
class.
The message's sender.
An arbitrary string that will be
carried by the message.
The callback method that can be executed
by the recipient to notify the sender that the message has been
processed.
Initializes a new instance of the
class.
The message's sender.
The message's intended target. This parameter can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
An arbitrary string that will be
carried by the message.
The callback method that can be executed
by the recipient to notify the sender that the message has been
processed.
Executes the callback that was provided with the message.
A generic command whose sole purpose is to relay its functionality to other
objects by invoking delegates. The default return value for the CanExecute
method is 'true'. This class allows you to accept command parameters in the
Execute and CanExecute callback methods.
The type of the command parameter.
Initializes a new instance of the RelayCommand class that
can always execute.
The execution logic.
If the execute argument is null.
Initializes a new instance of the RelayCommand class.
The execution logic.
The execution status logic.
If the execute argument is null.
Raises the event.
Defines the method that determines whether the command can execute in its current state.
Data used by the command. If the command does not require data
to be passed, this object can be set to a null reference
true if this command can be executed; otherwise, false.
Defines the method to be called when the command is invoked.
Data used by the command. If the command does not require data
to be passed, this object can be set to a null reference
Occurs when changes occur that affect whether the command should execute.
A command whose sole purpose is to relay its functionality to other
objects by invoking delegates. The default return value for the CanExecute
method is 'true'. This class does not allow you to accept command parameters in the
Execute and CanExecute callback methods.
Initializes a new instance of the RelayCommand class that
can always execute.
The execution logic.
If the execute argument is null.
Initializes a new instance of the RelayCommand class.
The execution logic.
The execution status logic.
If the execute argument is null.
Raises the event.
Defines the method that determines whether the command can execute in its current state.
This parameter will always be ignored.
true if this command can be executed; otherwise, false.
Defines the method to be called when the command is invoked.
This parameter will always be ignored.
Occurs when changes occur that affect whether the command should execute.
Use this class to send a message requesting to display a message box with features
corresponding to this message's properties. The Callback property should be used
to notify the message's sender about the user's choice in the message box.
Typically, you can use this message typ's recipient will be an element of the View,
and the sender will possibly be a ViewModel.
Initializes a new instance of the DialogMessage class.
The text displayed by the message box.
A callback method that should be executed to deliver the result
of the message box to the object that sent the message.
Initializes a new instance of the DialogMessage class.
The message's original sender.
The text displayed by the message box.
A callback method that should be executed to deliver the result
of the message box to the object that sent the message.
Initializes a new instance of the DialogMessage class.
The message's original sender.
The message's intended target. This parameter can be used
to give an indication as to whom the message was intended for. Of course
this is only an indication, amd may be null.
The text displayed by the message box.
A callback method that should be executed to deliver the result
of the message box to the object that sent the message.
Utility method, checks if the property is
null, and if it is not null, executes it.
The result that must be passed
to the dialog message caller.
Gets or sets the buttons displayed by the message box.
Gets a callback method that should be executed to deliver the result
of the message box to the object that sent the message.
Gets or sets the caption for the message box.
Gets or sets which result is the default in the message box.
Gets or sets the icon for the message box.
Gets or sets the options for the message box.
A base class for the ViewModel classes in the MVVM pattern.
The IDisposable implementation of this class is obsolete, and
should not be used anymore. It will be removed in a future version.
Initializes a new instance of the ViewModelBase class.
Initializes a new instance of the ViewModelBase class.
An instance of a
used to broadcast messages to other objects. If null, this class
will attempt to broadcast using the Messenger's default
instance.
Broadcasts a PropertyChangedMessage using either the instance of
the Messenger that was passed to this class (if available)
or the Messenger's default instance.
The type of the property that
changed.
The value of the property before it
changed.
The value of the property after it
changed.
The name of the property that
changed.
Do not use this method anymore, it will be removed in a future
version. Use ICleanup.Cleanup() instead.
Do not use this method anymore, it will be removed in a future
version. Use ICleanup.Cleanup() instead.
Unregisters this instance from the Messenger class.
To cleanup additional resources, override this method, clean
up and then call base.Cleanup().
Raises the PropertyChanged event if needed, and broadcasts a
PropertyChangedMessage using the Messenger instance (or the
static default instance if no Messenger instance is available).
The type of the property that
changed.
The name of the property that
changed.
The property's value before the change
occurred.
The property's value after the change
occurred.
If true, a PropertyChangedMessage will
be broadcasted. If false, only the event will be raised.
Raises the PropertyChanged event if needed.
The name of the property that
changed.
Verifies that a property name exists in this ViewModel. This method
can be called before the property is used, for instance before
calling RaisePropertyChanged. It avoids errors when a property name
is changed but some places are missed.
This method is only active in DEBUG mode.
Occurs when a property value changes.
Gets a value indicating whether the control is in design mode
(running in Blend or Visual Studio).
Gets a value indicating whether the control is in design mode
(running under Blend or Visual Studio).
Gets or sets an instance of a used to
broadcast messages to other objects. If null, this class will
attempt to broadcast using the Messenger's default instance.