Table of Contents

Interface IDialogService

Namespace
Tudormobile.Wpf.Services
Assembly
Tudormobile.WpfApp.dll

Dialog management service.

public interface IDialogService : IWpfAppService
Inherited Members

Methods

ShowFileDialog(string?, string?, string?, bool)

Display and Open or Save file dialog to the user.

(bool?, FileDialog) ShowFileDialog(string? title, string? filter, string? filename, bool isSaveDialog = false)

Parameters

title string

The text shown in the title bar of the file dialog, or null if a localized default from the operating system is used (typically something like "Save As" or "Open").

filter string

A String that contains the filter. The default is Empty, which means that no filter is applied and all file types are displayed.

filename string

A String that is the full path of the file selected in the file dialog. The default is Empty.

isSaveDialog bool

True if Save file dialog; otherwise (false). The default value is (false).

Returns

(bool?, FileDialog)

ShowMessageBox(string?, string?, MessageBoxButton, MessageBoxImage, MessageBoxResult)

Displays a message box to the user.

MessageBoxResult ShowMessageBox(string? text, string? caption = "", MessageBoxButton button = MessageBoxButton.OK, MessageBoxImage icon = MessageBoxImage.None, MessageBoxResult result = MessageBoxResult.OK)

Parameters

text string

A String that specifies the text to display.

caption string

A String that specifies the title bar caption to display.

button MessageBoxButton

A MessageBoxButton value that specifies which button or buttons to display.

icon MessageBoxImage

A MessageBoxImage value that specifies the icon to display.

result MessageBoxResult

A MessageBoxResult value that specifies the default result of the message box.

Returns

MessageBoxResult

A MessageBoxResult value that specifies which message box button is clicked by the user.