Getting Started with NativeWebView

NativeWebView is split into a small set of focused packages so you can compose only the browser surface you need:

  • NativeWebView: Avalonia NativeControlHost surface for embedding the native browser view.
  • NativeWebView.Core: controller layer, diagnostics, capability model, and backend abstractions.
  • NativeWebView.Dialog: dialog/window facade for desktop browser windows.
  • NativeWebView.Auth: authentication broker facade for OAuth and sign-in flows.
  • NativeWebView.Interop: native handle contracts and interop structs.
  • NativeWebView.Platform.*: platform registrations and backend implementations.

What You Will Build

By the end of this section you will have:

  • An Avalonia window hosting NativeWebView.
  • Platform backend registration for the current runtime.
  • Runtime readiness checks before first navigation.
  • A working choice between Embedded, GpuSurface, and Offscreen render modes.
  1. Installation
  2. Quickstart
  3. Render Modes
  4. Platform Notes
  5. Platform Prerequisites

Pick the Right Integration Path

Choose the primary surface first:

Choose the render mode next:

  • Embedded: best native fidelity and input behavior.
  • GpuSurface: composited capture path for reduced airspace issues while staying GPU-backed.
  • Offscreen: fully managed composition path for overlays, captures, and host-controlled layering.

Operational Model

NativeWebView assumes startup validation is part of the application contract:

  1. Register the current platform backend.
  2. Read diagnostics for the target platform.
  3. Fail fast on blocking issues.
  4. Create and initialize the control or facade.
  5. Enable optional CI/reporting scripts when shipping packages.

Next