Interface IDialogService
Interface abstracting the interaction between view models and views when it comes to opening dialogs using the MVVM pattern in WPF.
Namespace: ISynergy.Framework.Mvvm.Abstractions.Services
Assembly: ISynergy.Framework.Mvvm.dll
Syntax
public interface IDialogService
Methods
View SourceShowDialogAsync<TEntity>(IWindow, IViewModelDialog<TEntity>)
Shows the dialog asynchronous.
Declaration
Task ShowDialogAsync<TEntity>(IWindow dialog, IViewModelDialog<TEntity> viewmodel)
Parameters
Type | Name | Description |
---|---|---|
IWindow | dialog | The window. |
IViewModelDialog<TEntity> | viewmodel | The viewmodel. |
Returns
Type | Description |
---|---|
Task | Task<System.Boolean>. |
Type Parameters
Name | Description |
---|---|
TEntity | The type of the t entity. |
ShowDialogAsync<TEntity>(Type, IViewModelDialog<TEntity>)
Shows the dialog asynchronous.
Declaration
Task ShowDialogAsync<TEntity>(Type type, IViewModelDialog<TEntity> viewmodel)
Parameters
Type | Name | Description |
---|---|---|
Type | type | The type. |
IViewModelDialog<TEntity> | viewmodel | The viewmodel. |
Returns
Type | Description |
---|---|
Task | Task<System.Boolean>. |
Type Parameters
Name | Description |
---|---|
TEntity | The type of the t entity. |
ShowDialogAsync<TWindow, TViewModel, TEntity>()
Shows the dialog asynchronous.
Declaration
Task ShowDialogAsync<TWindow, TViewModel, TEntity>()
where TWindow : IWindow where TViewModel : IViewModelDialog<TEntity>
Returns
Type | Description |
---|---|
Task | Task{TEntity}. |
Type Parameters
Name | Description |
---|---|
TWindow | The type of the t window. |
TViewModel | The type of the t view model. |
TEntity | The type of the t entity. |
ShowDialogAsync<TWindow, TViewModel, TEntity>(TEntity)
Shows the dialog asynchronous.
Declaration
Task ShowDialogAsync<TWindow, TViewModel, TEntity>(TEntity e)
where TWindow : IWindow where TViewModel : IViewModelDialog<TEntity>
Parameters
Type | Name | Description |
---|---|---|
TEntity | e | The selected item. |
Returns
Type | Description |
---|---|
Task | Task{TEntity}. |
Type Parameters
Name | Description |
---|---|
TWindow | The type of the t window. |
TViewModel | The type of the t view model. |
TEntity | The type of the t entity. |
ShowErrorAsync(Exception, String)
Shows the error asynchronous.
Declaration
Task<MessageBoxResult> ShowErrorAsync(Exception error, string title = "")
Parameters
Type | Name | Description |
---|---|---|
Exception | error | The error. |
System.String | title | The title. |
Returns
Type | Description |
---|---|
Task<MessageBoxResult> | Task<MessageBoxResult>. |
ShowErrorAsync(String, String)
Shows the error asynchronous.
Declaration
Task<MessageBoxResult> ShowErrorAsync(string message, string title = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message. |
System.String | title | The title. |
Returns
Type | Description |
---|---|
Task<MessageBoxResult> | Task<MessageBoxResult>. |
ShowGreetingAsync(String)
Shows the greeting asynchronous.
Declaration
Task ShowGreetingAsync(string name)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | The name. |
Returns
Type | Description |
---|---|
Task | Task. |
ShowInformationAsync(String, String)
Shows the information asynchronous.
Declaration
Task<MessageBoxResult> ShowInformationAsync(string message, string title = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message. |
System.String | title | The title. |
Returns
Type | Description |
---|---|
Task<MessageBoxResult> | Task<MessageBoxResult>. |
ShowMessageAsync(String, String, MessageBoxButton)
Shows message box asynchronous.
Declaration
Task<MessageBoxResult> ShowMessageAsync(string message, string title = "", MessageBoxButton buttons = default(MessageBoxButton))
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message. |
System.String | title | The title. |
MessageBoxButton | buttons | The buttons. |
Returns
Type | Description |
---|---|
Task<MessageBoxResult> | Task<MessageBoxResult>. |
ShowWarningAsync(String, String)
Shows the warning asynchronous.
Declaration
Task<MessageBoxResult> ShowWarningAsync(string message, string title = "")
Parameters
Type | Name | Description |
---|---|---|
System.String | message | The message. |
System.String | title | The title. |
Returns
Type | Description |
---|---|
Task<MessageBoxResult> | Task<MessageBoxResult>. |