Artemis Artemis
Artemis Artemis

Search Results for

    Interface IWindowService

    A service that can be used to show windows and dialogs.

    Namespace: Artemis.UI.Shared.Services
    Assembly: Artemis.UI.Shared.dll
    Syntax
    public interface IWindowService : IArtemisSharedUIService

    Methods

    CreateContentDialog()

    Creates a content dialog, use the fluent API to configure it

    Declaration
    ContentDialogBuilder CreateContentDialog()
    Returns
    Type Description
    ContentDialogBuilder

    The builder that can be used to configure the dialog

    CreateOpenFileDialog()

    Creates an open file dialog, use the fluent API to configure it

    Declaration
    OpenFileDialogBuilder CreateOpenFileDialog()
    Returns
    Type Description
    OpenFileDialogBuilder

    The builder that can be used to configure the dialog

    CreateOpenFolderDialog()

    Creates an open folder dialog, use the fluent API to configure it

    Declaration
    OpenFolderDialogBuilder CreateOpenFolderDialog()
    Returns
    Type Description
    OpenFolderDialogBuilder

    The builder that can be used to configure the dialog

    CreateSaveFileDialog()

    Creates a save file dialog, use the fluent API to configure it

    Declaration
    SaveFileDialogBuilder CreateSaveFileDialog()
    Returns
    Type Description
    SaveFileDialogBuilder

    The builder that can be used to configure the dialog

    GetCurrentWindow()

    Gets the current window of the application

    Declaration
    Window? GetCurrentWindow()
    Returns
    Type Description
    Window

    The current window of the application

    ShowConfirmContentDialog(string, string, string, string?)

    Shows a content dialog asking the user to confirm an action

    Declaration
    Task<bool> ShowConfirmContentDialog(string title, string message, string confirm = "Confirm", string? cancel = "Cancel")
    Parameters
    Type Name Description
    string title

    The title of the dialog

    string message

    The message of the dialog

    string confirm

    The text of the confirm button

    string cancel

    The text of the cancel button, if null the cancel button will not be shown

    Returns
    Type Description
    Task<bool>

    A task containing the result of the dialog, true if confirmed; otherwise false

    ShowDialogAsync(object)

    Given a ViewModel, show its corresponding View as a dialog

    Declaration
    Task ShowDialogAsync(object viewModel)
    Parameters
    Type Name Description
    object viewModel

    ViewModel to show the View for

    Returns
    Type Description
    Task

    ShowDialogAsync<TResult>(DialogViewModelBase<TResult>)

    Given an existing ViewModel, show its corresponding View as a Dialog

    Declaration
    Task<TResult> ShowDialogAsync<TResult>(DialogViewModelBase<TResult> viewModel)
    Parameters
    Type Name Description
    DialogViewModelBase<TResult> viewModel

    ViewModel to show the View for

    Returns
    Type Description
    Task<TResult>

    A task containing the return value of type TResult

    Type Parameters
    Name Description
    TResult

    The return type

    ShowDialogAsync<TViewModel>(params object[])

    Creates a view model instance of type TViewModel and shows its corresponding View as a dialog

    Declaration
    Task<TViewModel> ShowDialogAsync<TViewModel>(params object[] parameters)
    Parameters
    Type Name Description
    object[] parameters
    Returns
    Type Description
    Task<TViewModel>

    The created view model

    Type Parameters
    Name Description
    TViewModel

    The type of view model to create

    ShowDialogAsync<TViewModel, TResult>(params object[])

    Creates a view model instance of type TViewModel and shows its corresponding View as a Dialog

    Declaration
    Task<TResult> ShowDialogAsync<TViewModel, TResult>(params object[] parameters) where TViewModel : DialogViewModelBase<TResult>
    Parameters
    Type Name Description
    object[] parameters
    Returns
    Type Description
    Task<TResult>

    A task containing the return value of type TResult

    Type Parameters
    Name Description
    TViewModel

    The view model type

    TResult

    The return type

    ShowExceptionDialog(string, Exception)

    Shows a dialog displaying the given exception

    Declaration
    void ShowExceptionDialog(string title, Exception exception)
    Parameters
    Type Name Description
    string title

    The title of the dialog

    Exception exception

    The exception to display

    ShowWindow(object)

    Given a ViewModel, show its corresponding View as a window

    Declaration
    Window ShowWindow(object viewModel)
    Parameters
    Type Name Description
    object viewModel

    ViewModel to show the View for

    Returns
    Type Description
    Window

    ShowWindow<TViewModel>(out TViewModel, params object[])

    Creates a view model instance of type TViewModel and shows its corresponding View as a window

    Declaration
    Window ShowWindow<TViewModel>(out TViewModel viewModel, params object[] parameters)
    Parameters
    Type Name Description
    TViewModel viewModel
    object[] parameters
    Returns
    Type Description
    Window

    The created view model

    Type Parameters
    Name Description
    TViewModel

    The type of view model to create

    Content is available under the PolyForm Noncommercial License, by Artemis RGB.