Set the editor border

    Match the editor frame to the surrounding Avalonia layout using native border settings. These settings affect the control frame, not borders authored inside the HTML document.

    Document tables and styled elements have their own content properties.

    Actual native Avalonia editor frame, toolbar and HTML document surface.
    Actual native Avalonia editor frame, toolbar and HTML document surface.

    Use it in your application

    Use the control border properties in XAML or code. Standard Avalonia layout, margins and container styles remain available.

    Keep document colors in the document styling API and native chrome colors in the native styling system.

    Test the result in your application theme and actual display scaling.

    editor.EditorBorderColor = Colors.SlateGray;
    editor.EditorBorderWidth = new Thickness(1);

    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.