Interface IDialogsFactory
Describes object providing methods for dialog based actions.
public interface IDialogsFactoryMethods
ActivateGlobalProgress(Action<GlobalProgressActionArgs>, GlobalProgressOptions)
Activates progress dialog blocking app interaction until progress is finished or canceled.
GlobalProgressResult ActivateGlobalProgress(Action<GlobalProgressActionArgs> progresAction, GlobalProgressOptions progressOptions)Parameters
- progresActionAction<GlobalProgressActionArgs>
- Action to be executed. 
- progressOptionsGlobalProgressOptions
- Options for progress dialog. 
Returns
- GlobalProgressResult
- Status of the action execution. 
ActivateGlobalProgress(Func<GlobalProgressActionArgs, Task>, GlobalProgressOptions)
Activates progress dialog blocking app interaction until progress is finished or canceled.
GlobalProgressResult ActivateGlobalProgress(Func<GlobalProgressActionArgs, Task> progresAction, GlobalProgressOptions progressOptions)Parameters
- progresActionFunc<GlobalProgressActionArgs, Task>
- Awaitable function to be executed. 
- progressOptionsGlobalProgressOptions
- Options for progress dialog. 
Returns
- GlobalProgressResult
- Status of the action execution. 
ChooseImageFile(List<ImageFileOption>, string, double, double)
Displays dialog with an option to choose single image.
ImageFileOption ChooseImageFile(List<ImageFileOption> files, string caption = null, double itemWidth = 240, double itemHeight = 180)Parameters
- filesList<ImageFileOption>
- captionstring
- itemWidthdouble
- itemHeightdouble
Returns
- ImageFileOption
- Null if dialog was canceled otherwise selected ImageFileOption object. 
ChooseItemWithSearch(List<GenericItemOption>, Func<string, List<GenericItemOption>>, string, string)
Displays dialog with an option to choose single item and option to search for different items.
GenericItemOption ChooseItemWithSearch(List<GenericItemOption> items, Func<string, List<GenericItemOption>> searchFunction, string defaultSearch = null, string caption = null)Parameters
- itemsList<GenericItemOption>
- searchFunctionFunc<string, List<GenericItemOption>>
- defaultSearchstring
- captionstring
Returns
- GenericItemOption
- Null if dialog was canceled otherwise selected GenericItemOption object. 
CreateWindow(WindowCreationOptions)
Creates new window with Playnite's default styling applied.
Window CreateWindow(WindowCreationOptions options)Parameters
- optionsWindowCreationOptions
- Custom window options. 
Returns
- Window
- New window instance. 
GetCurrentAppWindow()
Gets currently active window. If no window is active, main window is returned instead.
Window GetCurrentAppWindow()Returns
- Window
- Window object. 
SaveFile(string)
Displays system file save dialog.
string SaveFile(string filter)Parameters
- filterstring
- File filter, for example "ZIP Archive|*.zip" 
Returns
- string
- Selected file path or empty string if user cancels the dialog. 
SaveFile(string, bool)
Displays system file save dialog.
string SaveFile(string filter, bool promptOverwrite)Parameters
- filterstring
- File filter, for example "ZIP Archive|*.zip" 
- promptOverwritebool
- Indicates whether to ask user for file overrite if selected path exists. 
Returns
- string
- Selected file path or empty string if user cancels the dialog. 
SaveFile(string, bool, string)
string SaveFile(string filter, bool promptOverwrite, string initialDir)Parameters
Returns
SaveFile(string, string)
string SaveFile(string filter, string initialDir)Parameters
Returns
SelectFile(string)
Displays system open file dialog.
string SelectFile(string filter)Parameters
- filterstring
- File filter, for example "ZIP Archive|*.zip" 
Returns
- string
- Selected file path or empty string if user cancels the dialog. 
SelectFile(string, string)
string SelectFile(string filter, string initialDir)Parameters
Returns
SelectFiles(string)
Displays system open file dialog allowing to select multiple files.
List<string> SelectFiles(string filter)Parameters
- filterstring
- File filter, for example "ZIP Archive|*.zip" 
Returns
SelectFiles(string, string)
List<string> SelectFiles(string filter, string initialDir)Parameters
Returns
SelectFolder()
Displays system dialog for folder selection.
string SelectFolder()Returns
- string
- Selected folder path or empty string if user cancels the dialog. 
SelectFolder(string)
string SelectFolder(string initialDir)Parameters
- initialDirstring
Returns
SelectIconFile()
Displays file open dialog with file filter set to show only image files used for icons.
string SelectIconFile()Returns
- string
- Selected icon path or empty string if user cancels the dialog. 
SelectIconFile(string)
string SelectIconFile(string initialDir)Parameters
- initialDirstring
Returns
SelectImagefile()
Displays file open dialog with file filter set to show only image files.
string SelectImagefile()Returns
- string
- Selected image path or empty string if user cancels the dialog. 
SelectImagefile(string)
string SelectImagefile(string initialDir)Parameters
- initialDirstring
Returns
SelectString(string, string, string)
Displays dialog asking user to input text string.
StringSelectionDialogResult SelectString(string messageBoxText, string caption, string defaultInput)Parameters
- messageBoxTextstring
- Dialog message text. 
- captionstring
- Dialog window caption. 
- defaultInputstring
- Default string presented in input field. 
Returns
- StringSelectionDialogResult
- Selection result. 
SelectString(string, string, string, List<MessageBoxToggle>)
StringSelectionDialogResult SelectString(string messageBoxText, string caption, string defaultInput, List<MessageBoxToggle> options)Parameters
- messageBoxTextstring
- captionstring
- defaultInputstring
- optionsList<MessageBoxToggle>
Returns
ShowErrorMessage(string)
Displays error dialog window with text message.
MessageBoxResult ShowErrorMessage(string messageBoxText)Parameters
- messageBoxTextstring
- Dialog message text. 
Returns
ShowErrorMessage(string, string)
Displays error dialog window with text message.
MessageBoxResult ShowErrorMessage(string messageBoxText, string caption)Parameters
Returns
ShowMessage(string)
Displays dialog window with text message.
MessageBoxResult ShowMessage(string messageBoxText)Parameters
- messageBoxTextstring
- Dialog message text. 
Returns
- MessageBoxResult
- Selected dialog response. 
ShowMessage(string, string)
Displays dialog window with text message.
MessageBoxResult ShowMessage(string messageBoxText, string caption)Parameters
Returns
- MessageBoxResult
- Selected dialog response. 
ShowMessage(string, string, MessageBoxButton)
Displays dialog window with text message.
MessageBoxResult ShowMessage(string messageBoxText, string caption, MessageBoxButton button)Parameters
- messageBoxTextstring
- Dialog message text. 
- captionstring
- Dialog window caption. 
- buttonMessageBoxButton
- Available response button. 
Returns
- MessageBoxResult
- Selected dialog response. 
ShowMessage(string, string, MessageBoxButton, MessageBoxImage)
Displays dialog window with text message.
MessageBoxResult ShowMessage(string messageBoxText, string caption, MessageBoxButton button, MessageBoxImage icon)Parameters
- messageBoxTextstring
- Dialog message text. 
- captionstring
- Dialog window caption. 
- buttonMessageBoxButton
- Available response button. 
- iconMessageBoxImage
- Dialog icon. 
Returns
- MessageBoxResult
- Selected dialog response. 
ShowMessage(string, string, MessageBoxImage, List<MessageBoxOption>)
Displays dialog window custom response options.
MessageBoxOption ShowMessage(string messageBoxText, string caption, MessageBoxImage icon, List<MessageBoxOption> options)Parameters
- messageBoxTextstring
- Dialog message text. 
- captionstring
- Dialog window caption. 
- iconMessageBoxImage
- Dialog icon. 
- optionsList<MessageBoxOption>
- Response options. 
Returns
- MessageBoxOption
- Selected dialog option. 
ShowSelectableString(string, string, string)
Displays dialog with textbox allowing to select/copy text.
void ShowSelectableString(string messageBoxText, string caption, string defaultInput)