Customize native dialogs

    Adapt native dialog presentation or replace a built-in dialog through the Dialog service. Dialog contexts carry the operation data and guarded apply workflow.

    Use the normal dialog-opening event for presentation changes that do not require a replacement window.

    Native image properties dialog previewing an embedded JPEG, with alternative text, aspect-ratio lock and width and height controls.
    Native image properties dialog previewing an embedded JPEG, with alternative text, aspect-ratio lock and width and height controls.

    Use it in your application

    The example changes only a dialog title. DialogOpening also exposes a cancellation flag for an application policy that prevents that operation.

    For a full replacement, assign the matching Create...DialogMethod on editor.Dialog. Return a native Avalonia Window and use the supplied context to apply supported data, rather than editing a hidden document directly.

    Preserve owner-window modality, cancellation and validation. The default workflows reject stale document or selection state before applying a result.

    editor.DialogOpening += (_, args) =>
    {
        args.Dialog.Title = "Document authoring - " + args.Name;
    };
    await editor.Dialog.ShowImageDialogAsync();

    Continue with

    Last updated on Oct 18, 2026

    Put this into practice.

    Start with the C# Avalonia sample. Restore this edition's package and install the native browser prerequisites before running it.

    Prefer a guided look? Book a free live demo with our engineers - live on Zoom or Teams, never a chatbot.