GalaSoft.MvvmLight.Platform
Helper class for dispatcher operations on the UI thread.
Gets a reference to the UI thread's dispatcher, after the
method has been called on the UI thread.
Executes an action on the UI thread. If this method is called
from the UI thread, the action is executed immendiately. If the
method is called from another thread, the action will be enqueued
on the UI thread's dispatcher and executed asynchronously.
For additional operations on the UI thread, you can get a
reference to the UI thread's dispatcher thanks to the property
.
The action that will be executed on the UI
thread.
Invokes an action asynchronously on the UI thread.
The action that must be executed.
The object that provides handlers for the completed async event dispatch.
This method should be called once on the UI thread to ensure that
the property is initialized.
In a Silverlight application, call this method in the
Application_Startup event handler, after the MainPage is constructed.
In WPF, call this method on the static App() constructor.
Resets the class by deleting the
An implementation of allowing
to display simple dialogs to the user. Note that this class
uses the built in Android dialogs which may or may not
be sufficient for your needs. Using this class is easy
but feel free to develop your own IDialogService implementation
if needed.
Displays information about an error.
The message to be shown to the user.
The title of the dialog box. This may be null.
The text shown in the only button
in the dialog box. If left null, the text "OK" will be used.
A callback that should be executed after
the dialog box is closed by the user.
A Task allowing this async method to be awaited.
Displays information about an error.
The exception of which the message must be shown to the user.
The title of the dialog box. This may be null.
The text shown in the only button
in the dialog box. If left null, the text "OK" will be used.
A callback that should be executed after
the dialog box is closed by the user.
A Task allowing this async method to be awaited.
Displays information to the user. The dialog box will have only
one button with the text "OK".
The message to be shown to the user.
The title of the dialog box. This may be null.
A Task allowing this async method to be awaited.
Displays information to the user. The dialog box will have only
one button.
The message to be shown to the user.
The title of the dialog box. This may be null.
The text shown in the only button
in the dialog box. If left null, the text "OK" will be used.
A callback that should be executed after
the dialog box is closed by the user.
A Task allowing this async method to be awaited.
Displays information to the user. The dialog box will have only
one button.
The message to be shown to the user.
The title of the dialog box. This may be null.
The text shown in the "confirm" button
in the dialog box. If left null, the text "OK" will be used.
The text shown in the "cancel" button
in the dialog box. If left null, the text "Cancel" will be used.
A callback that should be executed after
the dialog box is closed by the user. The callback method will get a boolean
parameter indicating if the "confirm" button (true) or the "cancel" button
(false) was pressed by the user.
A Task allowing this async method to be awaited.
Displays information to the user in a simple dialog box. The dialog box will have only
one button with the text "OK". This method should be used for debugging purposes.
The message to be shown to the user.
The title of the dialog box. This may be null.
A Task allowing this async method to be awaited.
Windows 8 and Windows Phone Application 8.1 implementation of .
The key that is returned by the property
when the current Page is the root page.
The key that is returned by the property
when the current Page is not found.
This can be the case when the navigation wasn't managed by this NavigationService,
for example when it is directly triggered in the code behind, and the
NavigationService was not configured for this page type.
The key corresponding to the currently displayed page.
If possible, discards the current page and displays the previous page
on the navigation stack.
Displays a new page corresponding to the given key.
Make sure to call the
method first.
The key corresponding to the page
that should be displayed.
When this method is called for
a key that has not been configured earlier.
Displays a new page corresponding to the given key,
and passes a parameter to the new page.
Make sure to call the
method first.
The key corresponding to the page
that should be displayed.
The parameter that should be passed
to the new page.
When this method is called for
a key that has not been configured earlier.
Adds a key/page pair to the navigation service.
The key that will be used later
in the or methods.
The type of the page corresponding to the key.