Skip to content

ConfirmationDialog

Sergei Calabonga edited this page Jun 29, 2025 · 1 revision

New feature implemented ConfirmationDialog. Now you can ask your user some confirmations:

[RelayCommand]
private void OpenLogsFolder()
    => _dialogService.ShowConfirmation("Open logs folder?", result =>
    {
        if (result.ConfirmResult != ConfirmationType.Ok)
        {
            return;
        }

        var path = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "logs");

        if (!Path.Exists(path))
        {
            _dialogService.ShowNotification($"Folder not found: {path}");
            return;
        }

        Process.Start(new ProcessStartInfo
        {
            FileName = path,
            UseShellExecute = true,
            Verb = "open"
        });
    }, ConfirmationTypes.OkCancel);

Clone this wiki locally